c语言中的问题unexpected end of file found 执行 cl.exe 时出错.
#include<stdio.h>main(){intn,t;scanf("%d",&n);t=n/5;n=t;switch(n){case0:case1:case2:c...
#include<stdio.h>
main()
{
int n,t;
scanf("%d",&n);
t=n/5;
n=t;
switch (n)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:printf("None\n");break;
case 16:printf("Second\n");break;
case 17:printf("Third\n");break;
case 18:printf("First\n");break;
case 19:printf("First\n");break;
case 20:printf("First\n");break;
default:printf("None\n");
}
return 0;
} 展开
main()
{
int n,t;
scanf("%d",&n);
t=n/5;
n=t;
switch (n)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:printf("None\n");break;
case 16:printf("Second\n");break;
case 17:printf("Third\n");break;
case 18:printf("First\n");break;
case 19:printf("First\n");break;
case 20:printf("First\n");break;
default:printf("None\n");
}
return 0;
} 展开
展开全部
最后不用加return 0;这边根本不用返回什么东西啊。
还有下面的
t=n/5;
n=t;可以改为一句: n=n/5;或n/=5;
还有下面的
t=n/5;
n=t;可以改为一句: n=n/5;或n/=5;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
#include<stdio.h>
main()
{
int n,t;
scanf("%d",&n);
t=n/5;
n=t;
switch (n)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:printf("None\n");break;
case 16:printf("Second\n");break;
case 17:printf("Third\n");break;
case 18:printf("First\n");break;
case 19:printf("First\n");break;
case 20:printf("First\n");break;
default:printf("None\n");
}
return 0;
}
main()
{
int n,t;
scanf("%d",&n);
t=n/5;
n=t;
switch (n)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:printf("None\n");break;
case 16:printf("Second\n");break;
case 17:printf("Third\n");break;
case 18:printf("First\n");break;
case 19:printf("First\n");break;
case 20:printf("First\n");break;
default:printf("None\n");
}
return 0;
}
追问
???到底哪里。。请指明
追答
程序错误网络问题
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询