Question: 8. Using the multiple-alternative form of the if statement, write the C++ code for a multiple-alternative selection structure that displays the month. corresponding to the
For example, if the monthNum variable contains the number 1, the selection structure should display the string "January". If the month number is not 1 through 12, display the
"Incorrect month number' mossage.
9. The C++ code shown in Figure 6-45 should display "Illinois" when the state code is 1 , "Kentucky" when it's 2, "New Hampshire" when it's 3, "Vermont" when it's 4, and "Massachusetts" when it's 5 . If the state code is not 1 through 5 , the code should display the "Unknown state" message. Correct the errors in the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
