#include <stdio.h>
int main()
{
int y, m;
scanf("%d\\%d",&y, &m);
if(((y % 4 == 0)&&(y % 100 != 0))||(y % 400 == 0))
{
switch(m)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:printf("31\n");break;
case 4:
case 6:
case 9:
case 11:printf("30\n");break;
case 2:printf("29\n");break;
}
}
else
{
switch(m)
C语言实验——某年某月的天数
最新推荐文章于 2020-12-10 23:16:28 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)