Question: Write a program that asks the user for a year ( int ) and checks if a given year ( int ) is a leap

Write a program that asks the user for a year (int) and checks if a given year (int) is a
leap year. Leap years are divisible by 4. If a year is divisible by 100, but not divisible by 400,
that year is skipped. Then return to the users using the following sentences: [given
year]is not a leap year. or [given year]is a leap year.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Programming Questions!