課程
/后端開發
/C
/C語言入門
求問這個代碼哪里錯了?
2019-07-08
源自:C語言入門 4-3
正在回答
#include <stdio.h>
int main()?
{
? ? int score = 7200;
? ? //完善一下代碼
if(score>=10000)? ??
? ? {
? ? ? ? printf("鉆石玩家");
? ? }
else if(score>=5000)? ??
? ? ? ? printf("白金玩家");? ??
else if(score>=1000)? ??
? ? ? ? printf("青銅玩家");? ? ?
else??
? ? ? ? printf("普通玩家");? ??
? ? return 0;
}
? ? if(score >= 10000)
? ? ? ? printf("%s\n","鉆石玩家");
? ? else if(10000 >= score)
? ? ? ? printf("%s\n","白金玩家"); ? ?
? ? else if(5000 >= score)
? ? ? ? printf("%s\n","青銅玩家"); ? ??
? ? else?
? ? ? ? printf("%s\n","普通玩家"); ? ?
? ? ? ?
? ? if(score>=10000)
? ? else if(score>=5000&&score<10000)??//你少了“&&”兩個符號
? ? else if(score>=1000&&score<5000)? //你少了“&&”兩個符號
? ? else if(score<1000)
? ? else if(score>=5000&&score<10000)
? ? else if(score>=1000&&score<5000)
波波啊啊啊
慕的地21332321 回復 波波啊啊啊
你這個可能是輸入法問題,你可以試試我的
? ? if( score >= 10000)
? ? else if( score >= 5000 )
? ? else if( score >= 1000 )
? ? else
想幫你,但是懶得輸入一遍代碼
舉報
C語言入門視頻教程,帶你進入編程世界的必修課-C語言
4 回答和答案一樣,但運行失敗
4 回答求大神解答為什么會運行失敗呀??
1 回答代碼驗證過了,但運行結果是錯的,怎么回事,求大神解答
2 回答這樣怎么也是運行成功呢?求大神解答
2 回答求大神解答,下標的含義是什么,百度了但是還沒懂
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2019-07-23
#include <stdio.h>
int main()?
{
? ? int score = 7200;
? ? //完善一下代碼
if(score>=10000)? ??
? ? {
? ? ? ? printf("鉆石玩家");
? ? }
else if(score>=5000)? ??
? ? {
? ? ? ? printf("白金玩家");? ??
? ? }
else if(score>=1000)? ??
? ? {
? ? ? ? printf("青銅玩家");? ? ?
? ? }
else??
? ? {
? ? ? ? printf("普通玩家");? ??
? ? }
? ? return 0;
}
2019-07-22
#include <stdio.h>
int main()?
{
? ? int score = 7200;
? ? //完善一下代碼
? ? if(score >= 10000)
? ? {
? ? ? ? printf("%s\n","鉆石玩家");
? ? }
? ? else if(10000 >= score)
? ? {
? ? ? ? printf("%s\n","白金玩家"); ? ?
? ? }
? ? else if(5000 >= score)
? ? {
? ? ? ? printf("%s\n","青銅玩家"); ? ??
? ? }
? ? else?
? ? {
? ? ? ? printf("%s\n","普通玩家"); ? ?
? ? }
? ? return 0;
? ? ? ?
}
2019-07-17
#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 if(score<1000)
? ? {
? ? ? ? printf("普通玩家");? ??
? ? }
? ? return 0;
}
2019-07-17
#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 if(score<1000)
? ? {
? ? ? ? printf("普通玩家");? ??
? ? }
? ? return 0;
}
2019-07-12
你這個可能是輸入法問題,你可以試試我的
#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;
}
2019-07-08
想幫你,但是懶得輸入一遍代碼