下面是源代码:
# include <stdio.h>
int main(void)
{
float score;
printf("请输入您的考试成绩:");
scanf("%f",&score)
if (score > 100)
printf("这是在做梦\n");
else if (score >=90 && score < 100)
printf("优秀\n");
else if (score >=80 && score < 90)
printf("良好\n");
else if (score >=60 && score < 80)
printf("及格\n");
else if (sore >=0 && score < 60)
printf("继续加油!\n");
else
printf("输入有错\n");
return 0;
}
------------------------------------------------------------
Compiling...
校正求分数的等级.cpp
F:\...\练习\校正求分数的等级.cpp(5) : error C2018: unknown character '0xa3'
F:\..\练习\校正求分数的等级.cpp(5) : error C2018: unknown character '0xbb'
F:\..\练习\校正求分数的等级.cpp(6) : error C2146: syntax error : missing ';' before identifier 'scanf'
F:\..\练习\校正求分数的等级.cpp(7) : error C2143: syntax error : missing ';' before 'if'
F:\..\练习\校正求分数的等级.cpp(15) : error C2065: 'sore' : undeclared identifier
F:\..\练习\校正求分数的等级.cpp(18) : error C2018: unknown character '0xa3'
F:\..\练习\校正求分数的等级.cpp(18) : error C2018: unknown character '0xbb'
F:\..\练习\校正求分数的等级.cpp(19) : error C2143: syntax error : missing ';' before 'return'
执行 cl.exe 时出错.
校正求分数的等级.obj - 1 error(s), 0 warning(s)