課程
/后端開發(fā)
/C
/C語(yǔ)言入門
printf("%s\n","鉆石玩家"); printf("鉆石玩家"); 這兩種寫法有什么區(qū)別嗎???????????求解!?。。。。。。?/p>
2016-05-13
源自:C語(yǔ)言入門 4-3
正在回答
后者是輸出不了的,因?yàn)椤般@石玩家”是字符串要用%s來(lái)說(shuō)明
前者實(shí)現(xiàn)換行,后者沒有
舉報(bào)
C語(yǔ)言入門視頻教程,帶你進(jìn)入編程世界的必修課-C語(yǔ)言
1 回答printf("鉆石玩家"); 和 printf(“%s\n”,"鉆石玩家"); 有區(qū)別嗎? 不加“%s\n” 有問題嗎?
1 回答為什么輸出是鉆石玩家
3 回答#include <stdio.h> int main() { int score = 7200; //完善一下代碼 {if(score>=10000) printf("鉆石玩家"); } else if(score>=5000) { printf("白金玩家"); } else if(score>=1000) { printf("青銅玩家"); }
1 回答#include <stdio.h> int main() { int score = 7200; if("score>=10000") { printf("鉆石玩家"); } else if("score>=5000") { printf("白金玩家"); } else if("score>=1000") { printf("青銅玩家"); } el
3 回答#include <stdio.h> int main() { int score = 7200; //完善一下代碼 if(score>=10000) { printf("鉆石玩家"); } else if(score>=5000) { printf("白金玩家"); } else if(score>=1000) { printf("青銅玩家"); }
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-05-29
后者是輸出不了的,因?yàn)椤般@石玩家”是字符串要用%s來(lái)說(shuō)明
2016-05-13
前者實(shí)現(xiàn)換行,后者沒有