#include<stdio.h>#define MONTH 12int main(){ int days[MONTH]={31,28,31,30,31,30,31,31,30,31,30,31}; int month; do{ printf("input a month:"); scanf("%d",&month); }while (month<1||month>12); printf("The number of days is %d\n",days[MONTH-1]); return 0;}
1 回答
- 1 回答
- 0 关注
- 1124 浏览
添加回答
举报
0/150
提交
取消