Leap Year Calculation

Introduction

Calculate if a given year is a leap year.

Design

The program will

  1. Ask the user for a year (positive integer)
  2. Tell the user if it is a leap year or not
  3. Loop until the user enters a "quit" command
  4. Generate an error message if the the year is not a positive integer or the "quit" command
  5. Define a minimum and maximum year that is allowed to be entered

Leap Year Calculation

if year is not divisible by 4 then not leap year
else if year is not divisible by 100 then leap year
else if year is divisible by 400 then leap year
else not leap year

From Wikipedia - Leap Year

Try This

Given a date, what day of the week is it?
(Day,Month,Year) = (Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday)