課程
/后端開發
/C
/C語言入門
哪里不對呢,,就是沒法通過。。。
2016-10-28
源自:C語言入門 4-3
正在回答
#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 if (score<1000)
? ? ? ? printf("%s\n","普通玩家"); ? ?
? ? return 0;
}
ReyL 提問者
最后一個else 后面不加判斷,你試試
舉報
C語言入門視頻教程,帶你進入編程世界的必修課-C語言
1 回答程序對但是輸出錯誤?
2 回答程序中多行printf輸出出現錯誤
2 回答程序錯誤出在哪里
5 回答程序錯誤?
4 回答輸出錯誤
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2016-10-29
#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 if (score<1000)
? ? {
? ? ? ? printf("%s\n","普通玩家"); ? ?
? ? }
? ? return 0;
}
2016-10-28
最后一個else 后面不加判斷,你試試