Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A regular year in the modern Gregorian Calendar consists of 365 days. To keep the calendar in alignment with the Earth's revolutions around the sun

image text in transcribed

A regular year in the modern Gregorian Calendar consists of 365 days. To keep the calendar in alignment with the Earth's revolutions around the sun we have the Leap Years which consists of 366 days. The extra day in the leap year is the February 29th. The rules for a given year to be a leap year are: The year must be divisible by 4, and If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400 According to these rules, the years 1712, 2000, 2016, and 2400 are leap years, while 1800, 1900, 2200, and 2500 are NOT leap years. Task Write a C program named Is Leap Year.c that takes in a year and determines whether that year is a leap year or not. The program should allow user to continuously enter more year to see the result. Terminate the program if the user entered any non-integer input. Submission Submit the following two items to Blackboard: 1. IsLeapYear.c 2. A screenshot with the program and output showing. The output should contain the test result for the following years in order: 1712, 1900, 1999, 2000, 2016, 2020, and 2500. Simulate the following output closely: Please enter a year:1712 IS 1712 is a leap year? Yes! Please enter a year: 1900 IS 1900 is a leap year? No! Please enter a year:1999 IS 1999 is a leap year? No! Please enter a year: 2000 IS 2000 is a leap year? Yes! Please enter a year: 2016 IS 2016 is a leap year? Yes! Please enter a year: 2020 IS 2020 is a leap year? Yes! Please enter a year: 2500 IS 2500 is a leap year? No! Please enter a year: Random input Bye

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. What are your challenges in the creative process?

Answered: 1 week ago