Problem 18 - ECOR1606 Problem Solving and Computers Page 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECOR1606 – Problem Solving and Computers Page 1 of 2 Department of Systems and Computer Engineering Carleton University C ALENDAR D ISPLAY Background information In this program we want to display a monthly calendar for the month and year specified by the user. The user will be prompted to enter the year, month, and day of the week where the first occurs (Sunday = 1, Monday = 2, …, Saturday = 7). The program will display a title for the calendar, which includes the month (alphabetically represented) and year, followed by the calendar (taking care of the n umber of days in particular months, accounting for leap years as well). Note the formatting of the output, which has columns that are right justified of width 5. The user is continually prompted for new entries until the user enters zeros for all the entries. The program should take care of garbage input (e.g. letters) as well as invalid inputs (negative years, months that are not between 1 and 12, day of the week that is not between 1 and 7). See the Example output.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Problem 18 - ECOR1606 Problem Solving and Computers Page 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online