Question: This program outputs the correct responses except when 1 9 0 0 is inputed as the year. The boolean variable should be false

This program outputs the correct responses except when "1900" is inputed as the year. The boolean variable should be false after the input is run through (inputYear %400==0) because it is not divisible by 400 but the program still outputs it as "1900- leap year" . What is wrong with the code?
 This program outputs the correct responses except when "1900" is inputed

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!