X Tutup
Skip to content

Commit f75bafc

Browse files
authored
Create PrintPattern.java
1 parent 7976819 commit f75bafc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Programs/PrintPattern.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Program to print a pattern using nested for loops
3+
* eg:- *
4+
* * *
5+
* * * *
6+
* * * * *
7+
* * * * * *
8+
* @author arshcoder13 - https://github.com/arshcoder13/
9+
**/
10+
11+
public class PrintPattern {
12+
13+
public static void main(String args[]){
14+
15+
for(int i=1;i<=5;i++){
16+
for(int j=1;j<=i;j++){
17+
System.out.print("* ");
18+
}
19+
System.out.println();
20+
}
21+
22+
}
23+
24+
}

0 commit comments

Comments
 (0)
X Tutup