#include<stdio.h>#include<string.h>int main(){?int month;?char *a[]={"January","February","March","April","May","June","July","August","September","Octorber","November","December"};?printf("請(qǐng)輸入月份 ");?scanf("%d",&month);?if(month>0&&month<13)?{??printf("%s\n",*a[month-1]);?}?else?{??printf("請(qǐng)輸入有效月份!\n");?}}
2 回答

慕后端3352169
TA貢獻(xiàn)9條經(jīng)驗(yàn) 獲得超3個(gè)贊
估計(jì)警告是no newline at end of file,你可以無視它,另外你輸入至少得弄個(gè)循環(huán)吧,要不然一次輸入錯(cuò)誤就不可以重新輸入
- 2 回答
- 0 關(guān)注
- 1398 瀏覽
添加回答
舉報(bào)
0/150
提交
取消