最后一行有問題。求大師指點
#include <stdio.h>
int main()?
{
? ? int score = 7200;
? ? //完善一下代碼
? ? if( score >= 10000)
? ? {
? ? ? ? printf("鉆石玩家");
? ? }
? ? else if(score >= 5000 )
? ? {
? ? ? ? printf("白金玩家");? ??
? ? }
? ? else if(score >= 1000 )
? ? {
? ? ? ? printf("青銅玩家");? ? ?
? ? }
? ? else(score < 1000)
? ? {
? ? ? ? printf("普通玩家");? ? ? ? 、// 每次有這一步的時候錯誤。沒有的話正常。求大佬們指點。
? ? }
? ? return 0;
}
2019-03-15
#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 if(score<1000)
? ? {
? ? ? ? printf("普通玩家");? ??
? ? }
? ? return 0;
}
2019-03-12
? ? ? ? printf("青銅玩家");? ? ?
? ? }
? ? else(score < 1000)
? ? {
? ? ? ? printf("普通玩家");? ? ? ? 、// 每次有這一步的時候錯誤。沒有的話正常。求大佬們指點。
? ? }
? ? return 0;
}
下劃線處我輸入? if(score<1000) 執行也是正確的
2019-02-22
else表示的是:上述所有條件都不滿足才執行到else{..................................此處略去三萬字,嘻嘻}里的代碼!
2019-02-17
else 后面什么都不用加了
2019-02-10
這個else后面不能再加(score<1000)了,因為else已經包括了除了這個else以上所有score的取值范圍(score<1000)了。