為什么這里else if(score>=5000&&score<10000)要把這行往前移動(dòng)才能運(yùn)行成功,如果和上一個(gè)if同一列就不可以運(yùn)行?
#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
??? {
??????? printf("普通玩家");???
??? }
??? return 0;
}
2020-09-10
#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
? ? {
? ? ? ? printf("普通玩家");? ??
? ? }
? ? return 0;
}
這樣是能運(yùn)行成功的 可能是網(wǎng)頁(yè)識(shí)別有時(shí)候bug