到底什么問題啊?老是報錯!
#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;
}
2017-03-02
你的括號錯了,要英文的括號,你把輸入法切換成英文再改一下就好,正確代碼如下:
#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;
}
2017-03-02
幫你試了半天,發(fā)現(xiàn)你的()是中文格式下的,應該用英文格式下的()
?if(score >= 10000)
else if(score >= 5000 && score < 10000)
else if(score >= 1000 && score<5000)
這些()格式都不對