LeapYear

Write a program that determines whether a year is a leap year or not:
1. Take an input from a user. It has to be a positive number since it is a ‘year’, if it is not give
a
user another try and then terminate if the input is still not a positive number (remember that 0 is
neither positive nor negative).
2. Write a function isLeap that checks if a year is a leap year (algorithm for ‘leap year’ can be
found online).
3. Don’t forget to test your function.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.