What will be the output of the following code fragment. If (year%100==0) If (year%400==0) System. Out. Print1n ("LEAP") ;
else
System. Out. Print1n ("Not century year") If the input is given is
(a) 2000 (b) 1900 (c) 2018?
Answers
Answered by
0
a) LEAP
b) Not century year
c) Not century year
An extra day (February 29) is added to the normal calendar in a leap year. Most people are aware that leap years are years that can be divided by four.
Two examples of leap years are 1992 and 1996. Century years are not leap years, hence this rule does not apply to them.
For instance, the years 1800 and 1900 do not have leap years. The exception to the rule is that leap years are centennial years that are divisible by 400.
As a result, 2000 is a leap year.
To learn more about Input output refer to the links below:-
https://brainly.in/question/11091050
https://brainly.in/question/15432279
#SPJ1
Similar questions