wangjun19790929 于 2014.07.26 23:10 提问

# include

int main(void)

{
float score;

printf("请输入你的考试成绩：\n");

scanf("%f", score);

if(score > 100)
printf("白日做梦\n");
else if(score>=90 && score<=100)
printf("优\n");
else if(score>=80 && score printf("良\n");
else if(score>=60 && score printf("及格\n");
else if(score>=0 && score<60)
printf("不及格\n");
else
printf("太差了\n");

return 0;
}

4个回答

u014284411   2014.07.27 00:09

else if(score>=80 && score printf("良\n");
else if(score>=60 && score printf("及格\n");

#include
int main()
{
float score;
printf("请输入您的考试成绩:\n");
scanf("%f",&score);
if(score>100)
printf("白日做梦!\n");
else if(score>=90&&score<=100)
printf("优!\n");
else if(score>=80&&score printf("良!\n");
else if(score>=60&&score<80)
printf("及格\n");
else
printf("不及格!\n");
return 0;
}

/*int main(void)

{
float score;

printf("请输入你的考试成绩：\n");

scanf("%f", score);

if(score > 100)
printf("白日做梦\n");
else if(score>=90 && score<=100)
printf("优\n");
else if(score>=80 && score printf("良\n");
else if(score>=60 && score printf("及格\n");
else if(score>=0 && score<60)
printf("不及格\n");
else
printf("太差了\n");

return 0;
}*/

Evo_is_here   2014.07.27 12:20

scanf("%f", score);

if(score > 100)