Purchase Solution

C++ Program to display calendar of any month

Not what you're looking for?

Ask Custom Question

Write a program that prompts the user to enter the year and the month and displays on the console the calendar table for the month.

For example, if the user entered 2011 for the year, and 5 for the month, the program should display the calendar for May 2011, as shown for December month in the attached picture.

Example of program action (in the console numbers are formatted to be exactly under the week days):

Enter Year: 2011
Enter Month: 5

May 2011
---------------------------
Sun Mon Tue Wed Thu 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 31

Attachments
Purchase this Solution

Solution Summary

C++ program to display the calendar table for an year. Program prompts for year and month and displays calendar for this month in a console. The program will take into account leap years, different number of days in the months and will evaluate the first day of the week.

Solution Preview

Please find attached C++ file (main.cpp), compiled and tested using Visual ...

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.