int main()
{
int year,month,day;
int i,j=28,days=0;
cout<<"Input date(yyyy mm dd):";
cin>>year;
cin>>month;
cin>>day;
if((year/100)&&!(year/4)||year/400)
j=29;
switch (month)
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:i=31;
break;
case 2: i=j;
break;
case 4:
case 6:
case 9:
case 11: i=30;
break;
default:{
cout<<"Fault date:month"<<endl;
return 1;
}
if ((day>i)||(day<1))
{
cout<<"Fault date:days"<<endl;
return 1;
}
switch (month)
case 1:days=day;break;
case 2:days=31+day;break;
case 3:days=31+j+day;break;
case 4:days=31+j+31+day;break;
case 5:days=31+j+31+30+day;break;
case 6:days=31+j+31+30+31+day;break;
case 7:days=31+j+31+30+31+30+day;break;
case 8:days=31+j+31+30+31+30+31+day;break;
case 9:days=31+j+31+30+31+30+31+31+day;break;
case 10:days=31+j+31+30+31+30+31+31+30+day;break;
case 11:days=31+j+31+30+31+30+31+31+30+31+day;break;
case 12:days=31+j+31+30+31+30+31+31+30+31+30+day;break;