{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assignment_6 - Please enter a month(1 – 12 13 13 is not a...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science G175 - C++ Programming Assignment 6 Assignment_6.cpp (3 points) Create a program that counts the number of elapsed days from Jan 1, 2010 to a date in the year 2010 specified by the user. Program output should be similar to the following: This program calculates the number of days from Jan 1, 2010 to a date in the year 2010 that you specify. Please enter a month (1 – 12): 2 Please enter a day of the month: 27 57 days elapse between January 1, 2010 and February 27, 2010. The program should recognize invalid dates and should prompt the user to try again until they make a valid entry: This program calculates the number of days from Jan 1, 2010 to a date in the year 2010 that you specify.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Please enter a month (1 – 12): 13 13 is not a valid entry for the month. Please enter a value between 1 and 12: 2 Please enter a day of the month: 31 31 is not a valid day in the month of February. Please enter a value between 1 and 28: 26 56 days elapse between January 1, 2010 and February 26, 2010. The program should work for any valid day and month in the year 2010. Hint: Use an array to store the number of days in each month. You'll get 3 points for this assignment. In addition to these labs, also review the Word document “Session 6” that has been posted to the website. Please refer to our textbook, chapter “Lesson 8” for additional information. Page 1 of 1...
View Full Document

{[ snackBarMessage ]}