Skip to content

Commit cb25858

Browse files
Added Floyd triangle
1 parent 191b634 commit cb25858

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

floyd.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#https://www.facebook.com/lakshay.gulati.5/posts/3439658002768650
2+
# subscribed by Lakshay
3+
public class floyd {
4+
5+
public static void main(String[] args) {
6+
int x=1;
7+
for (int j =1;j<=5;j++){
8+
for (int i=0;i<j;i++){
9+
System.out.print(" "+x);
10+
x++;
11+
12+
}
13+
System.out.println();
14+
15+
}
16+
17+
}
18+
}

0 commit comments

Comments
 (0)