标签:
int main()
{
int grade;
printf("请输入成绩");
scanf("%d",&grade);
if(grade<0&&grade>100)
{
printf("输入错误");
}
if(grade>=90)
{printf("A");
}
else if(grade>=80&&grade<=89)
{printf("B");
}
else if(grade>70&&grade<=79)
{printf("C");
}
else if(grade>=60&&grade<=69)
{printf("D");
}
else if(grade<60&&grade>=0)
{printf("E");
}
return 0;
}
scanf("%d",&e);
a=e/10000;
b=e%10000/1000;
c=e%100/10;
d=e%10;
if(a==d&&b==c)
{printf("这个五位数是回文数\n");
}
else
{
printf("这个五位数不是回文数\n");
}
return 0;
}
int main()
{
int grade;
printf("请输入成绩");
scanf("%d",&grade);
switch(grade/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;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0:printf("E/n");break;
default:printf("error");
}
return 0;
}
scanf("%d",&a) ;
标签:
原文地址:http://www.cnblogs.com/1998li/p/5962309.html