#include
int main()
{
float score;
while(1)
printf("請輸入一個成績:\n");
scanf("%f",&score);
if(score100)
printf("成績輸入錯誤!\n");
else if(score>=0&&score
printf("成績等級為E\n");
else if(score>=60&&score
printf("成績等級為D\n");
else if(score>=70&&score
printf("成績等級為C\n");
else if(score>=80&&score
printf("成績等級為B\n");
else if(score>=90&&score
printf("成績等級為A\n");
}
return 0;
#include
int main()
{
float score;
while(1)
{
printf("請輸入一個成績:\n");
scanf("%f",&score);
if(score100)
printf("成績輸入錯誤!\n");
else if(score>=0&&score
printf("成績等級為E\n");
else if(score>=60&&score
printf("成績等級為D\n");
else if(score>=70&&score
printf("成績等級為C\n");
else if(score>=80&&score
printf("成績等級為B\n");
else if(score>=90&&score
printf("成績等級為A\n");
}
return 0;
}