(String args[])
| 21 | } |
| 22 | |
| 23 | public static void main(String args[]) { |
| 24 | Scanner I = new Scanner(System.in); |
| 25 | System.out.println("Enter the number n, to get the nth fibonacci number"); |
| 26 | int n = I.nextInt(); |
| 27 | if (n < 3) |
| 28 | System.out.println(n - 1); |
| 29 | else |
| 30 | { |
| 31 | System.out.println("0 1 "); |
| 32 | nth_fibo(0, 1, n); |
| 33 | } |
| 34 | I.close(); |
| 35 | } |
| 36 | } |