請(qǐng)各位看看哪里錯(cuò)了,謝謝
#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;
}
2019-11-22
你把&&和后面的刪掉試試 ?最后的else后面不用寫東西
2019-10-23
else(
? ? {
? ? ? ? printf("普通玩家");??
或者
else if(score<1000)
? ? {
? ? ? ? printf("普通玩家");??
2019-10-22
將最后else下的{}刪除
正確代碼如下
#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;
}
2019-10-22
else(score<1000)這個(gè)直接寫成else