(String args[])
| 21 | |
| 22 | // Driver Code |
| 23 | public static void main(String args[]) |
| 24 | { |
| 25 | Scanner in = new Scanner(System.in); // to take input we use scanner class. |
| 26 | System.out.print("Enter a number : "); |
| 27 | int n = in.nextInt(); |
| 28 | |
| 29 | System.out.println("Fibonacci num of " + n + " is : " + fibo(n)); |
| 30 | } |
| 31 | } |