C语言程序设计Day6 for循环 阶乘 #include <stdio.h> int main(){ int i=1; int fact=1; int n; scanf("%d",&n); while(i<=n){ fact *= i; i++; } printf("%d!=%d",n,fact); return 0; }