标签:cas printf scan default case 转换 core switch ret
#include <stdio.h>
int main()
{
int t;
while(scanf("%d",&t)!=EOF)
{
if(t>=0&&t<=100)
{
t=t/10;
switch(t)
{
case 10:
case 9:
printf("A\n");
break;
case 8:
printf("B\n");
break;
case 7:
printf("C\n");
break;
case 6:
printf("D\n");
break;
default:
printf("E\n");
break;
}
}
else
{
printf("Score is error!\n");
}
}
return 0;
}
标签:cas printf scan default case 转换 core switch ret
原文地址:https://www.cnblogs.com/heroin1/p/12329996.html