qq_慕沐4443347
2021-03-31 21:26
#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(score<1000)
{
printf("%s\n","普通玩家");
}
return 0;
}
把else里面的内容去掉,或者else后面加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
{
printf("%s\n","普通玩家");
}
return 0;
}
C语言入门
926020 学习 · 20793 问题
相似问题