Skip to content

Commit 153b9fe

Browse files
committed
add closeing the scanner
1 parent 58ddf8b commit 153b9fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Others/FibToN.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public static void main(String[] args) {
99
// print fibonacci sequence less than N
1010
int first = 0, second = 1;
1111
//first fibo and second fibonacci are 0 and 1 respectively
12-
12+
scn.close();
1313
while(first <= N){
1414
//print first fibo 0 then add second fibo into it while updating second as well
1515

0 commit comments

Comments
 (0)