# x.øi5 THE CODE FOR THAT PROGRAM BUT IT GIVING ME ERROR SO PLEASE CAN YOU CHECK. All years that are..

x.øi5 THE CODE FOR THAT PROGRAM BUT IT GIVING ME ERROR SO PLEASE CAN YOU CHECK.

All years that are evenly divisible by 400 or are evenly divisible by four (4) and not
evenly divisible by 100 are leap years. For example, since 1600 is evenly divisible by
400, the year 1600 was a leap year. Similarly, since 1988 is evenly divisible by four (4)
but not by 100, the year 1988 was also a leap year.
2. All months have either 31 days or 30 days, except Feb. that has 28 days (non-leap
years) or 29 days (leap years).
3. Any day that is beyond the limit should be detected and the program requests a reentry.
Write a program to:
(1) Accept an integer for MONTH, an integer for the DAY of the month, and an integer
for the year, and convert them into Months (January, February, …), Day, and Year
(if a leap year, informing the user on screen). If a number for MONTH or for DAY is out
of range, the program asks to re-enter the numbers.)
Output format:
(for input 11, 11, 2000) November 11, 2000. It is a leap year.
(for input 11, 11, 2001) November 11, 2001.
In your program, switch should be used for converting integer MONTH to its

#include //standard C++ IO operations using streams
#include//standard General Purpose functions (atoi, memalloc, …)
#include
#include
#include
#include

using namespace std;

//all programs start here in main function
int main()
{
int month, day, year, max_day, str_year, end_year, gap_year,num;
bool leap_yrfnd = false;//Varb to find if the year you&#39;re checking is a leap year

//Loop until a valid entry is entered in for day and month
do{

//Ask user to enter in day, month, year
cout
cout
cin>>month;
cout
cout
cin>>day;
cout
cout
cin>>year;
//Check to see if the year entered is a leap year
if(year%400 ==0){
leap_yrfnd = true;
}
else if(year%4 !=0){
leap_yrfnd = true;
}
else if(year%100!=0){
leap_yrfnd = true;
}

//Check to see if the day entered is within range for each month

if(month == 1 || month == 3|| month == 5 || month == 7 || month == 8||month==10||month==12)
{
max_day =31;
}
else if(month == 4 ||month== 6 ||month == 9 || month == 11 )
{
max_day =30;
}
else if(month == 2){//February you have to do something extra
if(leap_yrfnd == true)
max_day = 29;
else
max_day = 28;
}

//Notify User that an invalid entry happened
if(day>max_day || month>12){
cout}
while(day=31>max_day ||month>12);//Repromt the user if invalid entry

switch (month) {
case 1:cout break;
case 2:cout break;
case 3:cout break;
case 4:cout break;
case 5:cout break;
case 6:cout break;
case 7:cout break;
õp&x.øi5sp;case 8:cout break;
case 9:cout break;
case 10:cout break;
case 11:cout break;
case 12:cout break;
&U®;nx.øi5 />
}while(!leap_yrfnd);

BÁx