Skip to content

Commit dd655e1

Browse files
Control statment in java
For loop
1 parent 2931c59 commit dd655e1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Basics/ControlStatment/ForLoop.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class PyramidExample {
2+
public static void main(String[] args) {
3+
for(int i=1;i<=5;i++){
4+
for(int j=1;j<=i;j++){
5+
System.out.print("* ");
6+
}
7+
System.out.println();//new line
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)