File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public static void main(String[] args) {
9
9
// print fibonacci sequence less than N
10
10
int first = 0 , second = 1 ;
11
11
//first fibo and second fibonacci are 0 and 1 respectively
12
-
12
+ scn . close ();
13
13
while (first <= N ){
14
14
//print first fibo 0 then add second fibo into it while updating second as well
15
15
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ public static void main(String[] args) {
6
6
Scanner sc = new Scanner (System .in );
7
7
System .out .println ("Enter the number of rows which you want in your Floyd Triangle: " );
8
8
int r = sc .nextInt (), n = 0 ;
9
-
9
+ sc . close ();
10
10
for (int i =0 ; i < r ; i ++) {
11
11
for (int j =0 ; j <= i ; j ++) {
12
12
System .out .print (++n + " " );
You can’t perform that action at this time.
0 commit comments