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

这里哪错了?

#include <stdio.h>

int main() 

{

    int score = 7200;

    //完善一下代码

    

    {if(score>=10000)

        printf("王者玩家");

    }

    

    {else if(score>=5000)

        printf("白金玩家");    

    }

    

    {else if(score>=1000)

        printf("本以为是个王者,结果是个青铜");     

    }

  

    {else if(score<1000)

        printf("普通玩家");    

    }

    {else

        printf("退游吧");

    }

    return 0;

}


正在回答

2 回答

if()   和 else 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 if(score<1000)

    {    

        printf("普通玩家");    

    }

    else

    {   

        printf("退游吧");

    }

    return 0;

}


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

不好意思找到问题了


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

举报

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

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

进入课程

这里哪错了?

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