判定是否为闰年的问题.不知道为什么一直运行不了.请各位高手纠正下问题在哪
main(){int year,month,day,days;
int sum_day(int month,int day);
int leap(int year);
printf("please input year:\n");
scanf("%d",&year);
printf("please input month:\n");
scanf("%d",&month);
printf("please input month:\n");
scanf("%d",&day);
days=sum_day(month,day);
if(leap(year)>&&month>=3)days++;
printf("today is %dth day in this year!\n",days);
}
static int day_tab[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int sum_day(int month,int day)
{int i;
for(i=1;i<month;i++)
day=day+day_tab[i];
return day;
}
int leap(int year)
{int leap;
if(year%4==0&&year%100!=0llyear%400==0)leap=1;
else leap=0;
return leap;
}
错误显示在if(year%4==0&&year%100!=0llyear%400==0)leap=1;
的year%400的%上.
请问是哪里错了?