n的阶乘 include<stdio.h> include<stdlib.h> int main() { int n = 0; int i = 0; int ret = 1; printf("请输入n"); scanf("%d",&n)" for(i=0;i<-n;i++) { ret = i * ret; } printf("%d\n",ret); system("pause"); return 0; }