public class Demo05 {标签:return,递归,思想,int,public,static,method From: https://www.cnblogs.com/123jgh/p/16785004.html
//递归思想(调用自身),数量大的话,不用这个
public static void main(String[] args) {
System.out.println(f(5));
}
public static int f(int n){
if (n==1){
return 1;
}else {
return n*f(n-1);
}
}
}