Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download: http://solutionzip.com/downloads/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.
- Download: http://solutionzip.com/downloads/leapyear/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement