这两个代码应该没什么区别吧
#include <stdio.h>int main()
{
int score;
scanf("%d", &score);
if(score<60)
{
printf("The score is E!");
}
else if(60<=score && 70>score)
{
printf("The score is D!");
}
else if(70<=score && 80>score)
{
printf("The score is C!");
}
else if(80<=score && 90>score)
{
printf("The score is B!");
}
else if(90<=score)
{
printf("The score is A!");
}
} #include <stdio.h>
int main()
{
int score;
scanf("%d", &score);
if(score<60)
{
printf("The score is E!");
}
else if((score>60 || score==60) && score<70)
{
printf("The score is D!");
}
else if((score>70 || score==70) && score<80)
{
printf("The score is C!");
}
else if((score>80 || score==80) && score<90)
{
printf("The score is B!");
}
else if(score>90 || score==90)
{
printf("The score is A!");
}
} 嗯 没有区别
有没有区别其实自己跑下程序不就得了 没有。
(我这算灌水吗?)
页:
[1]