求助!月份第几天,为什么总是Runtime Error?
#include<stdio.h>#include<stdlib.h>
int main()
{
int a[12]={31,28,31,30,31,30,31,31,30,31,30,31},b,c,d,e,i,f;
while(scanf("%d %d %d",&b,&c,&d)!=EOF)
{e=0;
for(i=0;i<(c-1);i++)
e=a[i]+e;
e=e+d;
f=e+1;
if(b%4==0&&b%100!=0||b%400==0&&c>=3)
printf("%d\n",f);
else
printf("%d\n",e);}
return 0; }