#include <iostream>
#include <conio.h>
#include <time.h>
using namespace std;
int main()
{
char name[25];
int month,day,year,leap,room;
cout<<" Hotel Reservation \n\n";
cout<<"Please Enter Your Name: ";
cin.getline(name,sizeof(name));
system("cls");
cout<<"\n1 = January \t| 2 = February \t| 3 = March \t| 4 = April\n";
cout<<"5 = May \t| 6 = June \t| 7 = July \t| 8 = August\n";
cout<<"9 = September \t| 10 = October \t| 11 = November\t| 12 = December\n";
cout<<"Enter The (no.)Month of Reservation: ";
cin>>month;
if ((month>=13)||(month<=0)){
cout<<"\n\n\t\t\tInvalid Input";
getch();
return 0;
}
system("cls");
if ((month == 1)||(month == 3)||(month == 5)||(month == 7)||(month == 8)||(month == 10)||(month == 11)){
cout<<"Enter Day (1-31): ";
cin>>day;
if ((day<=0)||(day>=32)){
cout<<"Invalid Input";
getch();
return 0;
}
}
else if (month == 2){
cout<<"Enter Day (1-28/29): ";
cin>>day;
if ((day<=0)||(day>=30)){
cout<<"Invalid Input";
getch();
return 0;
}
}
else
{
cout<<"Enter Day (1-30): ";
cin>>day;
if ((day<=0)||(day>=31)){
cout<<"Invalid Input";
getch();
return 0;
}
}
system("cls");
cout<<"Enter Year: ";
cin>>year;
if ((year % 4 == 0)){
leap = 1;
}
if ((month == 1) && (day == 1) && (year == 1)){
cout<<"This date is already past";
getch();
return 0;
}
if ((month == 2) && (leap == 0) && (day == 29)){
cout<<"\n\n\t\tInvalid Input Theres no 29 of Feb. In This Year";
getch();
return 0;
}
system("cls");
cout<<"1 = Room Deluxe\t| 2 = Garage Room \t| 3 = Taxi Room\t|";
cout<<"\nRoom Class[no]: ";
cin>>room;
getch();
return 0;
}