哪里出问题了??
#include <stdio.h>int main()
{
int i,line,year[10],month[10],day[10];
scanf("%d",&line);
for(i = 0;i < line;i++)
{
scanf("%d%d%d",&year[i],&month[i],&day[i]);
}
int j;
for(j = 0;j < line;j++)
{
if(year[j]<=9999 && year[j]>=1 && month[j]<=12 && month[j]>=1)
{
if(year[j]%4==0&&year[j]%100!=0||year[j]%400==0)//判断闰年
{
int m,day_count = day[i];
for(m=1;m<month[i];m++)
{
switch (m)
{
case 1:case 3:case 5:case 7:case 8:case 10:case 12:
if(day[i]>=1&&day[i]<=31)
{
day_count += 31;
}
else
{
printf("Wrong Input");
}
break;
case 4:case 6:case 9:case 11:
if(day[i]>=1&&day[i]<=30)
{
day_count += 30;
}
else
{
printf("Wrong Input");
}
break;
case 2:
if(day[i]>=1&&day[i]<=29)
{
day_count += 29;
}
else
{
printf("Wrong Input");
}
break;
}
printf("%d",day_count);
}
}
else
{
int m,day_count = day[j];
for(m=1;m<month[j];m++)
{
switch (m)
{
case 1:case 3:case 5:case 7:case 8:case 10:case 12:
if(day[j]>=1&&day[j]<=31)
{
day_count += 31;
}
else
{
printf("Wrong Input");
}
break;
case 4:case 6:case 9:case 11:
if(day[j]>=1&&day[j]<=30)
{
day_count += 30;
}
else
{
printf("Wrong Input");
}
break;
case 2:
if(day[j]>=1&&day[j]<=29)
{
day_count += 28;
}
else
{
printf("Wrong Input");
}
break;
}
printf("%d",day_count);
}
}
}
else
printf("Wrong Input");
}
return 0;
}