(int num)
| 19 | } |
| 20 | |
| 21 | public static int factorial(int num) { |
| 22 | if (num == 1) { |
| 23 | return 1; |
| 24 | } else if (num > 1) { |
| 25 | return num * factorial(num - 1); |
| 26 | } else { |
| 27 | return -1; // Error |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | public static void main(String[] args) { |
| 32 | for (int i = 1; i < 12; i++) { |
no outgoing calls