把完整程序发出来我看看
已经自己解决了,谢谢老师
回复 祁老师:还没有解决。我发给老师看一下。
#include<stdio.h>
#include<stdlib.h>
main()
{
int i,n,s;
while (1)
system("cls");
s=1;
printf("enter the number:");
scanf("%d",&n);
if (n==0) break;
for(i=1;i<=n;i++)
s=s*i;
printf("n!=%d",s);
system("pause");
}
回复 倪颖轩:不可能会出现0的吧,
超过10的阶乘就已经超出了int的范围了 你可以定义long类型的
好的,谢谢老师
什么是数据透视表
如何插入背景图片
点赞
扫一扫分享朋友圈
二维码
分享
你确定要删除这个问题吗?