為啥無(wú)法輸出白金啊~
#include <stdio.h>
int main()?
{
? ? int score = 7200;
? ? //完善一下代碼
? ??
? ? {
? ? ? ? if(score >=10000)
? ? ? ? printf("%s\n","鉆石玩家");
? ? }
? ? ? ??
? ??
? ? {
? ? ? ? else if (score >=5000 )
? ? ? ? printf("%s\n","白金玩家"); ? ?
? ? }
? ??
? ? {
? ? ? ? else if (score>= 1000)
? ? ? ? printf("%s\n","青銅玩家"); ? ??
? ? }
??
? ? {
? ? ? ? else
? ? ? ? printf("%s\n","普通玩家"); ? ?
? ? }
? ? return 0;
}
2015-10-24
知道問題出在哪里了
末尾才用else而不是用多個(gè)else
2015-10-23
我的也輸不出答案
2015-10-23
#include <stdio.h>
int main()?
{
? ? int score = 7200;
? ? //完善一下代碼
? ? if(score>=10000)
? ? {?
? ? ? ? printf("%s\n","鉆石玩家");
? ? }
? ? else if(score >= 5000)
? ? {?
? ? ? ? printf("%s\n","白金玩家");
? ? } ?
? ? else(score >= 1000)
? ? {?
? ? ? ? printf("%s\n","青銅玩家");
? ? } ? ??
? ? else
? ? {?
? ? ? ? printf("%s\n","普通玩家");
? ? } ? ?
? ? return 0;
}
2015-10-18
if(score >= 10000)
? ? {
? ? ? ? printf("鉆石玩家");
? ? }
? ? else if(score >= 5000 )
? ? {
? ? ? ? printf("白金玩家"); ? ?
? ? }
你格式錯(cuò)了if在括號(hào)外面
2015-09-28
先把格式寫正確。。。。。。