有人幫助下,這個代碼哪里有問題了,麻煩指出下
#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;
}
2016-07-27
在printf里面要有"%s\n,"之后加上輸出的內(nèi)容,另外這個只需要單條件就行了,不需要&&score
2016-07-25
為什么{在if的前面
2016-07-25
if 和else要在{}外面?
2016-07-25
{的位置不對
#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;
}