Algorithm to check whether a given year is a leap year or not.

1. Start.

2. Read year.

3. If year % 400 == 0 ; It is Leap year.

4. Else if, year % 4==0 && year % 100 != 0; It is Leap year.

5. Else, not a leap year.

6. End.

No comments:

Post a Comment