int main() { int m,n,t; m=1; printf("输入一个数计算其阶乘:\n"); scanf("%d",&t); for(n=1;n<=t;n++) m=m*n; printf("阶乘:%d\n",m); }