qq_虚伪的一切_0
2015-08-24 21:40
#include
<stdio.h>
int main()
{
int score = 7200;
//完善一下代码
if(scoer >= 10000)
{
printf("%s\n","钻石玩家");
}
else if(scoer >= 5000)
{
printf("%s\n","白金玩家");
}
else if (scoer >= 1000);
{
printf("%s\n","青铜玩家");
}
else
{
printf("%s\n","普通玩家");
}
return 0;
}
谢谢啊,不过我已经自己找到了,一开始找了好久
if(scoer >= 10000)
{
printf("%s\n","钻石玩家");
}
else if(scoer >= 5000)
{
printf("%s\n","白金玩家");
}
else if (scoer >= 1000);
{
printf("%s\n","青铜玩家");
}这里条件判断的变量是score,而不是scoer。 还有这一行 else if (scoer >= 1000);多了分号,if()后面是不需要加分号的。
修改后的代码你看看
#include <stdio.h>
int main()
{
int score = 7200;
//完善一下代码
if(score >= 10000)
{
printf("%s\n","钻石玩家");
}
else if(score >= 5000)
{
printf("%s\n","白金玩家");
}
else if (score >= 1000)
{
printf("%s\n","青铜玩家");
}
else
{
printf("%s\n","普通玩家");
}
return 0;
}C语言入门
928132 学习 · 21543 问题
相似问题