各位大佬,我这个为什么运行失败了呀?
#include <stdio.h>
int main()
{
int year = 2008;
int month = 8;
int day = 8;
if(year%4==0&&year%400==0&&month>2)
{
day+=1;
}
else
{
day=day
}
switch(month)
{
case1:
result=31+day;break;
case2:
result=31+28+day;break;
case3:
result=31+28+31+day;break;
case4:
result=31+28+31+30+day;break;
case5:
result=31+28+31+30+31+day;break;
case6:
result=31+28+31+30+31+30+day;break;
case7:
result=31+28+31+30+31+30+31+day;break;
case8:
result=31+28+31+30+31+30+31+31+day;break;
}
printf("%d",result);
return 0;
}