Question
C++ A year with 366 days is called a leap year. A year is a leap year if it is divisible by four (for example,
C++ A year with 366 days is called a leap year. A year is a leap year if it is divisible by four (for example, 1980), except that it is not a leap year if it is divisible by 100 (for example, 1900); however, it is a leap year if it is divisible by 400 (for example, 2000). There were no exceptions before the introduction of the Gregorian calendar on October 15, 1582 (1500 was a leap year).
Write a program that asks the user for a year and computes whether that year is a leap year. Here are a few run results:
Please enter a year: 2015
2015 is not a leap year.
Press any key to continue . . .
Please enter a year: 2016
2016 is a leap year.
Press any key to continue . . .
Please enter a year: 1900
1900 is not a leap year.
Press any key to continue . . .
Step by Step Solution
3.43 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
Question include using namespace std int main int year cout Ple...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Document Format ( 2 attachments)
635e291c1cd5d_181969.pdf
180 KBs PDF File
635e291c1cd5d_181969.docx
120 KBs Word File
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started