int daysOfMonth[] ={31,28,31,30,31,30,31,31,30,31,30,31};
int isLeapYear(int year);
int main(void)
{
int y,m,d;
int days = 0;
int i;
printf("input date:(eg.2007/4/17)\n");
scanf("%d/%d/%d",&y,&m,&d);
if(isLeapYear(y))
daysOfMonth[1] = 29;
for(i = 0;i<m-1;i++)
days += daysOfMonth[i];
days += d;
printf("days=%d\n",days);
return 0;
}