We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4650fdc commit f921a1aCopy full SHA for f921a1a
Patterns/pat28.java
@@ -0,0 +1,45 @@
1
+public class pat28 {
2
+ public static void main(String[] args)
3
+ {
4
+ /*
5
+
6
+ *
7
+ * *
8
+ * * *
9
+ * * * *
10
+ * * * * *
11
12
13
14
15
16
+ */
17
18
+ //rows i , columns j
19
20
+ //change i, static j
21
22
+ for(int i=1; i<=5; i++)
23
24
+ for(int s=(5-i);s>=0;s--)//space is always rows - i, because i is values being printed
25
+ System.out.print(" ");
26
+ for(int j=1; j<= i; j++)
27
28
+ System.out.print("* ");
29
+ }
30
+ System.out.println();
31
32
33
+ for(int i=4; i>=1; i--)
34
35
36
37
+ for(int j=i; j>= 1; j--)
38
39
40
41
42
43
44
45
+}
0 commit comments