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 153b9fe commit 1e38751Copy full SHA for 1e38751
Others/FloydTriangle.java
@@ -6,7 +6,7 @@ public static void main(String[] args) {
6
Scanner sc = new Scanner(System.in);
7
System.out.println("Enter the number of rows which you want in your Floyd Triangle: ");
8
int r = sc.nextInt(), n = 0;
9
-
+ sc.close();
10
for(int i=0; i < r; i++) {
11
for(int j=0; j <= i; j++) {
12
System.out.print(++n + " ");
0 commit comments