6 September 2015

Pseudocode example

The following pseudocode determines whether a year is a leap year

if (year is not exactly divisible by 4) then (it is a common year)
else if (year is not exactly divisible by 100) then (it is a leap year)
else if (year is not exactly divisible by 400) then (it is a common year)
else (it is a leap year)

https://en.wikipedia.org/wiki/Leap_year

No comments:

Post a Comment