You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tongxun/递归算法计算 n!.cpp

20 lines
238 B

#include <stdio.h>
int N(int n)
{
if(n<=1)
return 1;
else
return N(n-1)*n;//<2F>ؼ<EFBFBD>˼<EFBFBD><CBBC>
}
int main()
{
int n=0;
int ret=0;
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>׳˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%d",&n);
ret=N(n);
printf("%d<>Ľ׳<C4BD><D7B3><EFBFBD>%d\n",n,ret);
return 0;
}