long factorial(int) {
if (i == 1) {
return 1;
} else {
return i * factorial(i - 1);
}
递归算法
原文:https://www.cnblogs.com/ss-123/p/8973447.html