Question: Program to determine that year is a leap year or not integer year year = Get next input Put year to output if year %

Program to determine that year is a leap year or not integer year year = Get next input Put year to output if year % 400 == 0 Put " is a leap year" to output elseif year % 100 == 0 Put " is not a leap year" to output elseif year % 4 == 0 Put " is a leap year" to output else Put " is not a leap year" to output

Output differs. See highlights below. Special character legend

Input

1954

Your output

1954

Expected output

1954 is not a leap year. ***********This is wrong and that's why it is failing to run*************

Input

2016

Your output

2016 is a leap year.

Input

1600

Your output

1600 is a leap year.

Input

1900

Your output

1900 is not 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 Databases Questions!