#include "stdio.h"
int main(void)
{
int x,y;
printf("please x:");
scanf("%d",&x);
if(x<60)
{
printf("E\n");
}
if(x>=60&&x<70)
{
printf("D\n");
}
if(x>=70&&x<80)
{
printf("C\n");
}
if(x>=80&&x<90)
{
printf("B\n");
}
if(x>=90&&x<100)
{
printf("A\n");
}
}
经测试,合格!!!
#include
int main(){
int score;
scanf("%d",&score);
if(score>=90){
printf("A\n");
}else if(score>=80){
printf("B\n");
}else if(score>=70){
printf("C\n");
}else if(score>=60){
printf("D\n");
}else{
printf("E\n");
return 0;
}
}
#include "stdio.h"
int main()
{
int x;
printf("please x:");
scanf("%d",&x);
if(x<60)
printf("E\n");
if(x>=60&&x<70)
printf("D\n");
if(x>=70&&x<80)
printf("C\n");
if(x>=80&&x<90)
printf("B\n");
if(x>=90&&x<100)
printf("A\n");
}