Write a program to display the following two prompts: Enter a MONTH (use 1 for J
ID: 3647079 • Letter: W
Question
Write a program to display the following two prompts: Enter a MONTH (use 1 for Jan, 2 for Feb etc.): Enter DAY of the MONTH: Having your program accept and store a number in the variable MONTH in response to first attempt, and accept and store a number in the variable DAY in response to the second prompt. If the month entered is not between 1 and 12 inclusive, print a message informing the user that an invalid month has been entered. The program should allow the user to input the number of month again. If the day entered is not between 1 and 31, print a message informing the user that an invalid day has been entered. The program should allow the user to input the number of DAY again.Explanation / Answer
#include #include using namespace std; int main(){ int MONTH, DAY; string wordmonth[13]={"Invalid_Month","Jan ","Feb ","Mar ","Apr ", "May ", "Jun ","Jul ","Aug ","Sep ", "Oct","Nov ","Dec "}; coutMONTH; while((MONTH12)){ coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.