Question: a). A year y is a century year if y is divisible by 100. Example: y=300 is a century year, but y=150 is not. b).

a). A year y is a century year if y is divisible by 100. Example: y=300 is a century year, but y=150 is not. 

b). A year y is a non-century year if y is not a century year. Example: y=150 is a noncentury year. Y=4 is a non-century year. 

c). A year y is a leap year if it is a non-century year that is divisible by 4, or a century year that is divisible by 400. Nothing else is a leap year. Example: y=4 is a leap year, y=100 is not a leap year, y=400 is a leap year.

 Question:

 Write a function bool leap year (into y) that when passed a year y will return true if y is a leap year and false if not.

Step by Step Solution

3.41 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Code include using namespace std bool leapyearint year int main int year ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Biology Questions!