Question: Write a program that takes a year as input to determine whether the year is a leap year or not. (Hint: Use the % (modulus)

 Write a program that takes a year as input to determine

Write a program that takes a year as input to determine whether the year is a leap year or not. (Hint: Use the % (modulus) operator) We know that in a leap year, the year has 366 days and the February is 29 days. It comes every 4 years. In a program you have to check the following to determine whether the year is a leap year or not: A year is a leap year if the following conditions are satisfied: 1. Year is multiple of 400. 2. Year is multiple of 4 and not multiple of 100. This means that in the Gregorian calendar, the years 2000 and 2400 are leap years, while 1800, 1900, 2100, 2200, 2300 and 2500 are NOT leap years. Sample input #1 Enter a year: 2020 2020 is a leap year. Sample input #2 Enter a year: 1800 1800 is not a leap year. (Note that it will not be graded). This is hypothetical Rubric: 2 point Taking input: 0.10 Displaying correct leap year for the test cases 90 Displaying correct not leap year for the test cases: 90 Writing good code: 0.10 Additional note: 20% penalty for not passing mimir test cases, even if your program shows the correct result. Hard coding to match mimir test cases will result in zero in this submission and zero in another submission

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 Databases Questions!