We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73fbd16 commit a85755eCopy full SHA for a85755e
Test 1:Zeros and Stars Pattern
@@ -0,0 +1,30 @@
1
+import java.util.Scanner;
2
+public class Solution {
3
+
4
+ public static void main(String[] args) {
5
+ Scanner s=new Scanner(System.in);
6
+ int n=s.nextInt();
7
8
+ int k,l;
9
+ for(k=1;k<=n;k++){
10
+ for(l=1;l<=n;l++){
11
+ if(k==l)
12
+ System.out.print("*");
13
+ else
14
+ System.out.print("0");
15
+ }
16
+ l--;
17
18
+ while(l>=1){
19
20
21
22
23
24
25
+ System.out.println("");
26
27
28
+}
29
30
0 commit comments