if / else problem...
As I am novice to C++, I would like to get help from the experts writing simple program for the following problem...
Write a C++ program that reads a month number as an integer (form 1 to 12) and a d ay number as an integer (form 1 to 31).
If the month entered is not between 1 and 12 inclusive, print a message informing the user that an invalid month has been entered. If the day entered is not between 1 and 31 inclusive, print a message informing the user that an invalid day has been entered.
If no error messages are displayed, print âWinterâ if the month is in the range 1-3, âSpringâ if the month is in the range 4-6, âSummerâ if the month is in the range 7-9, and âAutumnâ otherwise.
Thank you...
|