Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e38751

Browse files
committed
add closing the scanner
1 parent153b9fe commit1e38751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Others/FloydTriangle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public static void main(String[] args) {
66
Scannersc =newScanner(System.in);
77
System.out.println("Enter the number of rows which you want in your Floyd Triangle: ");
88
intr =sc.nextInt(),n =0;
9-
9+
sc.close();
1010
for(inti=0;i <r;i++) {
1111
for(intj=0;j <=i;j++) {
1212
System.out.print(++n +" ");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp