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) {
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
Original file line number Diff line number Diff 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 + " " );
You can’t perform that action at this time.
0 commit comments