expected '(' before 'else'
#include <stdio.h>
int main()
{
? ?int score = 7200;
? ?//完善一下代碼
? ?if(score>=10000)
? ?{
? ? ? ?printf("鉆石玩家");
? ?}
? ?if else(score>=5000)
? ?{
? ? ? ?printf("白金玩家"); ? ?
? ?}
? ?if else(score>=1000)
? ?{
? ? ? ?printf("青銅玩家"); ? ?
? ?}
? ?else
? ?{
? ? ? ?printf("普通玩家"); ? ?
? ?}
? ?return() 0;
}
然后錯誤提示 In function 'main':
error: expected '(' before 'else'
2015-03-02
if后面再次跟一個判斷的話,要寫else if。
你寫成了if else