int month = 0;
scanf("%d",&month);
switch (month) {
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
printf("%d月 31 天",month);
break;
case 4:
case 6:
case 9:
case 11:
printf("%d 月30天",month);
break;
case 2:
printf("%d 月29天",month);
break;
default:
break;
}
return 0;
本文出自 “久久归一” 博客,请务必保留此出处http://lulun426.blog.51cto.com/9197884/1533978
原文:http://lulun426.blog.51cto.com/9197884/1533978