C语言do while实现n!

#include #include /* run this program using the console pauser or add your own
#include 
#include /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[]) {int n,dangqianshu=1,jiechengshu=1;printf("请输入n:"); scanf("%d",&n);do{jiechengshu*=dangqianshu++;}while(dangqianshu<=n);printf("n阶乘为:%d",jiechengshu);return 0;
}