課程
/后端開發
/C
/C語言入門
輸入一個字符判斷若輸入的為英文字符則輸出english word若輸入的為數字字符則輸出number word否則則輸出The other word
2017-11-16
源自:C語言入門 5-4
正在回答
#include<stdio.h>
int main()
{
char word;
printf("請輸入字母:\n");
scanf("%c", &word);
if (word >= 65 && word <= 122)
printf("english word!\n");
else if (word >= 48 && word <= 57)
printf("number word!\n");
else
printf("The other word!\n");
return 0;
}
慕俠6294014
qq_龍戈_0 提問者
舉報
C語言入門視頻教程,帶你進入編程世界的必修課-C語言
1 回答求解答急急急
2 回答急急急!求解答!
1 回答急急急急急急求
4 回答急急急求大神
2 回答急急急急急急
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2017-11-16
#include<stdio.h>
int main()
{
char word;
printf("請輸入字母:\n");
scanf("%c", &word);
if (word >= 65 && word <= 122)
printf("english word!\n");
else if (word >= 48 && word <= 57)
printf("number word!\n");
else
printf("The other word!\n");
return 0;
}