mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 01:35:16 +08:00
add closeing the scanner
This commit is contained in:
@ -9,7 +9,7 @@ public class FibToN {
|
||||
// print fibonacci sequence less than N
|
||||
int first = 0, second = 1;
|
||||
//first fibo and second fibonacci are 0 and 1 respectively
|
||||
|
||||
scn.close();
|
||||
while(first <= N){
|
||||
//print first fibo 0 then add second fibo into it while updating second as well
|
||||
|
||||
|
Reference in New Issue
Block a user