請問哪錯了
#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;
}
2019-08-04
else后面不用加?xùn)|西,&&沒錯
2019-08-05
?else if(score>=5000&&score<10000)? 你這個&&后面的多余了。本身這個else執(zhí)行的時候就已經(jīng)是在上一個?if(score>=10000) 不存在的時候才運行,所以已經(jīng)默認這個score小于10000了
2019-08-03
你的邏輯冗余了,不需要&&