#include
main()
{int a[12]={31,28,31,30,31,30,31,31,30,31,30,31},/*平年的*/
b[12]={31,29,31,30,31,30,31,31,30,31,30,31};/*闰年的*/
int year,month,day,sum,n=0;
scanf("%d,%d,%d",&year,&month,&day);
if(year%4==0)
{for(sum=0;n
sum=sum+day;}
else
{ for(sum=0;n
sum=sum+day;}
printf("%d",sum);
getchar();
}
#include
int day_of_year(int (*p)[13],int year,int month,int day)
{
int i,leap;
leap=(year%100 !=0 && year%4 ==0||year%400 ==0);
for(i=1;i
return day;
}
main()
{
static int day_tab[][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf("%d\n",day_of_year(day_tab,a,b,c));
}