P

R

O

G

R

A

M

M

I

N

G

 

C

O

M

P

E

T

I

T

I

O

N

 

Calendar

Task #3

Novice

3 Points

Task Description
Write a program to print out a calendar for a particular month given the day on which the first of the month occurs together with the number of days in the month.

Program Input
Your program must prompt the user to input an integer representing the day of the week on which the month begins (1 for Sunday, 2 for Monday, ... , 7 for Saturday), and an integer specifying the number of days in the month (between 28 and 31 inclusive).  Your user prompts must match the prompts below.  You can assume that all input data will be valid.

Enter day:
3
Enter the number of days in the month:
30

Program Output
Your program should print the appropriate calendar for the month.  You must print the calendar heading (Sun, Mon, …., Sat) as shown below.

Sun Mon Tue Wed Thr Fri Sat
          1   2   3   4   5
  6   7   8   9  10  11  12
 13  14  15  16  17  18  19
 20  21  22  23  24  25  26
 27  28  29  30