|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 zjxy2545 于 2011-10-25 14:44 编辑
#include <stdio.h>
void main()
{
int score;
scanf("%d\n",score); 《《这句有2个错误,一个是%d后面不能加\n。加了就打印不出下面的内容,二个是score变量地址前没加&》》
if( score < 60)
{
printf("the score is E\n");
}
else if( (score > 60 || score == 60)&& score < 70 )
{
printf("the score is D\n");
}
else if( (score > 70 || score ==70)&& score < 80)
{
printf("the score is C\n");
}
else if(( score > 80 || score == 80)&& score < 90 )
{
printf("the score is B\n");
}
else if (score > 90 || score == 90) {
printf("the score is A\n");
}
}
提示错误是:C:\VC6.0\MSDev98\MyProjects\max5\max5.c(25) : error C2143: syntax error : missing ';' before '{' 执行 cl.exe 时出错.
大家那双亮闪闪的眼睛可以看出来吗?
已解,非常感谢大家,谢谢。。小生受教了。
|
|