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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started