Program that will ask for a month

Assignment Help C/C++ Programming
Reference no: EM13161022

Write a program that will ask for a month (1-12) and a year (yyyy). the program should then produce a calendar showing the month name and year and have all of the days displayed under it.

Here are the specifications:

  • The program must be programmed in standard C++

  • The month must be an integer from 1 to 12. If the user enters anything outside of that range, the program must display an error message and ask the user to re-enter the month until the user gets it right.

  • The year be an integer from 1582 to 2038. Anything other than that should produce an error message and ask the user to re-enter the year until the user gets it right.

  • There must be a left margin of 3 spaces and a top margin of one blank line.

  • The numbers in the calendar must be right-justified. Hint: setw.

  • Your calendar must take into account leap years. Leap years affect the month of February. On leap years, February must have 29 days. On non-leap years, February must have 28 days. See my notes on leap years for more information.

    prototypes:

    int getInteger( string prompt, int min, int max )

    void displayCalendar( int month, int year )

    This function should call the getDayOfWeek and getLastDay functions to build the calendar. Use getDayOfWeek to get the day of the week for the first day of the month then use getLastDay to get the total number of days in a month.

 

Reference no: EM13161022

Questions Cloud

Compare and contrast the shape of most animal cells : (A) Compare and contrast the shape of most animal cells with respect to most plant cells in terms of osmotic potential? (B) What is it that osmosis requires that sets it apart from simple diffusion?
What is the missing subnet id : What is the missing subnet ID for SUB3 assuming they are assigning the subnets in subnet ID  order? What is the range of IP addresses that may be used for hosts on SUB3?
Write a command to do an alphabetical sort on the third fiel : Write the command to run the file called 'process' assuming it is in your current directory, has execute permission, but that your current directory is not in the standard path command search list:
Hexadeciaml numerals are integers written : Hexadeciaml numerals are integers written in base 16. The digits used are '0' through '9' plus 'a' for the "digit 10", 'b' for the "digit 11", 'c' for the "digit 12", 'd' for the "digit 13", 'e' for the "digit 14", and 'f' for the "digit 15". For exa..
Program that will ask for a month : Write a program that will ask for a month (1-12) and a year (yyyy). the program should then produce a calendar showing the month name and year and have all of the days displayed under it.
Function whose job is to output some sequence : Write a function whose job is to output some sequence of "interesting" #'s. The numbers should be separated from one another somehow so they don't all run together. This function may need to call another function, where the second function determines..
What is the probability : Suppose that the probability than an incoming email is a spam is p(S), that the probability that the word "w" occurs in the subject line of the spam is p(w), and that q(w) is the probability that the word "w" occurs in the subject line of an email th..
Function whose job is to input : Write a function whose job is to input #'s, non-# to quit, recover from the input failure by calling recover(), and tell main some statistics about the numbers read. A. unsigned readA();
The user enter the total rainfall for each of 12 months : Write a program that lets the user enter the total rainfall for each of 12 months (starting with January) into an array of doubles. The program should calculate and display:the total rainfall for the year,the average monthly rainfall,and the months w..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that inputs a dollar amount to be printed

Write a program that inputs a dollar amount to be printed on a check and then prints the amount in check-protected format with leading asterisks if necessary

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

  Write function to accept character array

Write down the C++ function which will accept the character array of at most 30 cells. Your function must return true if string and its reverse are identical;

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Perform operations on arrays

Perform operations on arrays execute tests and repetitions

  Operating system and cpu scheduling

Operating System and CPU Scheduling

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write a program that skip s leading whitespace character

a) Write a program that skip s leading whitespace character s in each line of the pro vided data file CPPHumor .txt . Save the results in a new file

  Execute tests and repetitions

Read data from standard input and store them in an array, Execute tests and repetitions

  Recognition of the problem by the hsbc

What problem did the HSBC face in this case? What people, technology, and the organization factors were responsible for problem? Did HSBC management correctly recognize the problem?

  Uml diagram of all the classes

Speaking of converting into the correct object-type, the goal of the factory is to abstract away object creation.

  Determine the meaof the numbers in the array

Determine the mean(average) of the numbers in the array, and output the reslt. Use a subprogram to input the numbers, a function to find the mean.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd