(String args[])
| 15 | |
| 16 | // Driver Code |
| 17 | public static void main(String args[]) |
| 18 | { |
| 19 | Scanner in = new Scanner(System.in); |
| 20 | System.out.print("Enter a positive number : "); |
| 21 | int n = in.nextInt(); |
| 22 | |
| 23 | System.out.println("Factorial of " + n + " is " + power(n)); |
| 24 | } |
| 25 | } |