#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
int monthb,dateb,yearb;
cout<<"Jnab plz enter ur date of birth="<<endl;
cin>>dateb;
cin>>monthb;
cin>>yearb;
if(dateb>0 && dateb<32 && monthb==1||3||5||7||8||10||12)
{
cout<<"corect date of birth="<<dateb<<"-"<<monthb<<"-"<<yearb<<endl;
}
else if(dateb<31 && monthb==9||11||4||6)
{
cout<<"correct date of birth="<<dateb<<"-"<<monthb<<"-"<<yearb<<endl;
}
else if(dateb<30 && monthb==2 && yearb%4==0)
{
cout<<"correct date of birth="<<dateb<<"-"<<monthb<<"-"<<yearb<<endl;
}
else if(dateb<29 && monthb==2 && yearb%4!=0)
{
cout<<"correct date of birth="<<endl;
}
else
{
cout<<"wrong date of birth="<<endl;
}
getch();
{
int monthd,dated,yeard;
cout<<endl;
cout<<"Jnab plz enter date of death="<<endl;
cin>>dated;
cin>>monthd;
cin>>yeard;
if(dated>0 && dated<32 && monthd==1||3||5||7||8||10||12)
{
cout<<"corect date of death="<<dated<<"-"<<monthd<<"-"<<yeard<<endl;
}
else if(dated<31 && monthd==9||11||4||6)
{
cout<<"correct date of death="<<dated<<"-"<<monthd<<"-"<<yeard<<endl;
}
else if(dated<30 && monthd==2 && yeard%4==0)
{
cout<<"correct date of death="<<dated<<"-"<<monthd<<"-"<<yeard<<endl;
}
else if(dated<29 && monthd==2 && yeard%4!=0)
{
cout<<"correct date of death="<<endl;
}
else
{
cout<<"wrong date of death="<<endl;
}