#include <stdio.h>
int main()
{
int score = 7200;
//完善一下代码
if(score >= 10000)
{
printf("%s/n","钻石玩家");
}
else if(score >= 5000&&score<10000)
{
printf("%s/n","白金玩家");
}
else if(score>=1000&&score<50000)
{
printf("%s/n","青铜玩家");
}
else(score<1000)
{
printf("%s/n","普通玩家");
}
return 0;
}
大神快告诉我哪错了
else 后面不能有条件,直接输出,还有你/n反了
if(){
}else if(){
}
有判断的要把if带上
#include <stdio.h> int main() { int score = 7200; //完善一下代码 if(score >= 10000) { printf("%s\n","钻石玩家"); } else if(score >= 5000&&score<10000) { printf("%s\n","白金玩家"); } else if(score>=1000&&score<5000) { printf("%s\n","青铜玩家"); } else if(score<1000) { printf("%s\n","普通玩家"); } return 0; }