//输入一个年份和月份,打印该月有多少天。
#include<stdio.h>
void main(){
int year,month;
int flag=0;
printf("请输入年 月: ");
scanf("%d %d",&year,&month);
if(year%4==0&&year%100!=0||year%400==0)
flag=1; //是闰年
switch(month){
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
printf("31 days\n");
break;
case 2:
if(flag==1)
printf("29 days\n");
else
printf("28 days\n");
break;
case 4:
case 6:
case 9:
case 11:
printf("30 days\n");
break;
}