各位大神能幫看下哪里出了錯嗎
#include <stdio.h>
int main()
{
?? ?int score = 7200;
?? ?
?? ?if(score >= 10000)
?? ?{
?? ??? ?printf("鉆石玩家");
?? ?}
?? ?else if(score >= 5000 && <10000)
?? ?{
?? ??? ?printf("白金玩家");
?? ? }
?? ? else if(score >= 1000 && <5000)
?? ? {
?? ? ?? ?printf("青銅玩家");
?? ? }
?? ? else (score < 1000)
?? ? {
?? ? ?? ?printf("普通玩家");
?? ? }
?? ? return 0;
}
2018-04-25
#include <stdio.h>
int main()
{
?? ?int score ;
????printf("請輸入您的得分");
????scanf("%d",&score); ?
?? ?if(score >= 10000)
?? ?{
?? ??? ?printf("鉆石玩家");
?? ?}
?? ?else if(score >= 5000 &&? score<10000)
?? ?{
?? ??? ?printf("白金玩家");
?? ? }
?? ? else if(score >= 1000 && score<5000)
?? ? {
?? ? ?? ?printf("青銅玩家");
?? ? }
?? ? else? if(score < 1000 && score >= 0)
?? ? {
?? ? ?? ?printf("普通玩家");
?? ? }
????else{
????????printf("請重新輸入");
????}
?? ? return 0;
}
2022-03-26
哦,好的,謝謝加油,堅(jiān)持就是勝利。
2018-05-09
實(shí)例講解的時(shí)候有說考慮下為什么只有一個條件了
2018-04-26
把&&及后面條件去掉,else相當(dāng)于對上一個條件的否定
2018-04-24
把從 if 到 return之前的大括號去了,不然語法是錯的,還有最后那個 else用法錯誤,不要用else,else后面加 if
2018-04-24
你的最后else(score < 1000)輸入錯了,有兩種解決
直接輸入else,不需要后面的判斷條件(score < 1000);
如果要輸入判斷條件請?jiān)趀lse后面加上if,else if(score < 1000).
2018-04-23
最后個else后邊不用判斷的,語法錯誤
2018-04-22