#include <iostream>
using namespace std;
int main()
{
int birth_month=0, birth_year=0;
cout << "Enter date of birth:DD ";
cin >> birth_month;
cin >> birth_year;
if(birth_month>0){
if(birth_month<13){
if(birth_year>0){
cout << "The required date is:" << birth_month << "/" << birth_year; }else{
cout << "Please enter the valid year";
}
}else{
cout << "Please enter the valid month";
}
}else{
cout << "Please enter the valid month";
}
return 0;
}
Comments
Leave a comment