Question: 2. In C++ Design a switch statement that will take the monthNumber (which is an integer, and having values between 1 to 12) and is
2. In C++ Design a switch statement that will take the monthNumber (which is an integer, and having values between 1 to 12) and is an user-input, and it will store the corresponding month name in the string variable month, and also, noOfDays in the month based on the following table: monthNumber month noOfDays January 31 February 28 March 31 April May 31 June 30 July 31 August September October November 30 December 30 1 2 3 4 5 6 7 8 9 10 11 12 31 30 31 31 Finally, display the month name and no of days, based on user input for monthNumber
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
