Hello, I've been having some trouble for my class assignment. I'm supposed to input a year and then it will output if the year is a leap-year or not.
A year with 366 days is called a leap year.
A year is a leap year if it is divisible by four (for example, 1980), except that it is not a leap year if it is divisible by 100 (for example, 1900); however, it is a leap year if it is divisible by 400 (for example, 2000).
There were no exceptions before the introduction of the Gregorian calendar on October 15, 1582 (1500 was a leap year).
Write a program that asks the user for a year and computes whether that year is a leap year.
if (number % 100 != 0)
if (number % 400 == 0)
contradict each other. That is if number % 100 != 0 then it is not a value that is divisible by 400. Also you have not enough ellse statements that to print messages that a year is not leap.