Write a program that prompts the user to enter a particular month (1-12). You will then prompt the user to enter what day of the week the month begins on (0 for sunday, 1 for monday, etc...). After these 2 pieces of input, your program will display all of the days of the particular month in a calendar format. You will have to use massive if-else statements to print the correct month name. You will utilize logical operators to determine the total number of days in the month.
30 days - April, June, September, November
31 days - January, March, May, July, August, October, December
28 days - Febuary (ignore leap years)
Your output must be formatted apprpiatly utilizing cout.width. You should use a loop to correctly print out the days of the month. Sample below:
Enter a month (1-12): _1_
Enter a starting day (0 for sunday, 1 for mon...): _3_
January
S M T W T F S
1 2 3 4
5 ...
Press any key to continue.
Enter a month (1-12)...
CHALLENGE OF THE DAY- WRITE THIS C++ program using only if statements and do while loops?
i will write it.
for $450.00 bucks
Reply:School project, eh? Stick with it. We did.
carnation
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment