Skip to content

Commit 1e38751

Browse files
committed
add closing the scanner
1 parent 153b9fe commit 1e38751

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
Scanner sc = new Scanner(System.in);
77
System.out.println("Enter the number of rows which you want in your Floyd Triangle: ");
88
int r = sc.nextInt(), n = 0;
9-
9+
sc.close();
1010
for(int i=0; i < r; i++) {
1111
for(int j=0; j <= i; j++) {
1212
System.out.print(++n + " ");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy