麻烦指导一下错在哪了
#include <stdio.h>
int main()
{
/* 定义需要计算的日期 */
int year = 2008;
int month = 8;
int day = 8;
int x, i;
x == 0;
switch(month)
{
case 1:x += day;break;
case 2:x += 31;break;
case 3:x += 28;break;
case 4:x += 31;break;
case 5:x += 30;break;
case 6:x += 31;break;
case 7:x += 30;break;
case 8:x += 31;break;
case 9:x += 31;break;
case 10:x += 30;break;
case 11:x += 31;break;
case 12:x += 30;break;
default:break;
}
if(year%400==0||(year%4==0 &&year%100!=0))
i=1;
else
i=0;
if(i==1&&month>2)
x++;
printf("%d年%d月%d日是该年的第%d天",year, month, day, x);
return 0;
}