#include "stdafx.h"
#include//添加此头文件
void main()
{ float score;
printf("\n Please enter a score ");
scanf("%f",&score);
if(score<0 && score>100)//最后的分号去掉,<=改为<,>=改为>,0和100分都是可能的分数
printf("Data wrong!!! \n");//此句调到此处
else //添加此句
{//添加大括号
if(score>=90) printf("excellent\n");//80改为90,good改为excellent
else if (score>=80) printf("good\n");//90改为80,excellent改为good,excellent你拼写错了
else if (score>=70) printf("medium\n");
else if (score>=60) printf("pass\n");
else printf("not pass\n");
}//添加大括号
//else printf("Data wrong!!! \n");}此句调到第一个if语句之后
}
未加载必要的头文件、取值范围错误、if语句逻辑错误、单词拼写错误。一个小程序竟然把各种错误都体现出来了,还是比较少见的。