#include<stdio.h>
int main()
{
int year=2008;
int month=8;
int day=8;
int days=0;
int i=1;
int month=month-1;
for(i;i<=month;i++)
{
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
days=days+31;
continue;
case 2:
days=days+28;
continue;
case 4:
case 6:
case 9:
case 11:
days=days+30;
continue;
}
days=days+day;
}
if(year%4==0&&year%100!=0||year%400==0)
{
days=days+1;
}
printf("%d",days);
return 0;
}
添加回答
举报
0/150
提交
取消