public
class
Factorial
{
public static void main(String[] args) {
for (int i = 1; i < 10; i++)
System.out.print(getNext(i) + " ");
}
public static int getNext(int n) {
if (n == 1) return 1;
return n * getNext(n - 1);
}
}
public static void main(String[] args) {
for (int i = 1; i < 10; i++)
System.out.print(getNext(i) + " ");
}
public static int getNext(int n) {
if (n == 1) return 1;
return n * getNext(n - 1);
}
}