Karanbir S.

asked • 05/10/21

Objective: Leap years as we know them began in 1582. You are going to create a program that allows the user to enter a year and be told whether it is a leap year or a common year.

Specifications: 

  1. When your program opens, give a brief description of what a leap year is and why we have them. 
  2. Ask the user to enter a year.
  3. You must use TryParse to determine if the user has entered a positive integer. If they do not, you must give them an error message and send them back to the beginning.

Assuming they entered an appropriate year: 

  1. If they enter a number less than 1582, tell them to enter a more recent year. You can explain why in your error message.
  2. If they enter a year between 1582 and 3000, tell them whether their year is a leap year or a common year.
  3. If they enter a year greater than 3000, tell them not to look so far into the future.
  4. Make the program continuous. (Be sure to clear at appropriate times.)


1 Expert Answer

By:

Patrick B. answered • 05/10/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.