public class A3 {
public static void main (String args[]) {
int N=5;
for(int n=0;n<=N;n++) {
int s=f(n);
System.out.println(n+"的阶乘:"+s);
}
}
public static int f(int n) {
if(n==1) return 1;
if(n==0) return 0;
return f(n-1)*n;
}
}