cで書くと(nは求めたい階乗な) { n = n * manko(n-1) printf("n! = %d",n); exit(0); } int manko(int n) { if(n<1) return 1; return n * manko(n-1); } ってとこか