为了账号安全,请及时绑定邮箱和手机立即绑定

哪里出问题了呢?

#include <stdio.h>
int main()
{
    int score = 7200;
    //完善一下代码
    if(score>=10000)
    {
        printf("钻石玩家");
    }
    else if(score>=5000&&score<10000)
    {
        printf("白金玩家");   
    }
    else if(score>=1000&&score<5000)
    {
        printf("青铜玩家");    
    }
    else(score<1000)
    {
        printf("普通玩家");   
    }
    return 0;

正在回答

3 回答

这个其实没错,如果说错的话就是不符合,他给的答案。‘

可能认定你的if和else的条件重复了。下面这样应该就好了

#include <stdio.h>
int main()
{
    int score = 7200;
    //完善一下代码
    if(score>=10000)
    {
        printf("钻石玩家");
    }
    else if(score>=5000)
    {
        printf("白金玩家");   
    }
    else if(score>=1000)
    {
        printf("青铜玩家");    
    }
    else(score<1000)
    {
        printf("普通玩家");   
    }
    return 0;


1 回复 有任何疑惑可以回复我~

运行失败

hello.c: In function 'main':
hello.c:19:5: error: expected ';' before '{' token
     {


0 回复 有任何疑惑可以回复我~
#1

慕雪404944 提问者

我也不知道哪里的问题
2019-12-02 回复 有任何疑惑可以回复我~
发你的报错


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
C语言入门
  • 参与学习       924395    人
  • 解答问题       20753    个

C语言入门视频教程,带你进入编程世界的必修课-C语言

进入课程

哪里出问题了呢?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信