Question: Complete TRY THIS Exercise 11. If necessary, create a new project named ModifyThis12 Project, and save it in the Cpp8Chap06 folder. Enter (or copy) the
Complete TRY THIS Exercise 11. If necessary, create a new project named ModifyThis12 Project, and save it in the Cpp8\Chap06 folder. Enter (or copy) the instructions from the TryThis11.cpp file into a new source file named ModifyThis12.cpp. Be sure to change the filename in the first comment. Remove the default clause from the switch statement. Modify the code to verify that the department code is 1, 2, or 3 only. If the department code is valid, use the switch statement to determine the salary, and then display the salary. If the department code is not valid, display the “Invalid code” message.
Save and run the program. Test the program using the following codes: 1, 2, 3, and 7.
Step by Step Solution
3.48 Rating (165 Votes )
There are 3 Steps involved in it
ModifyThis12cpp displays the salary associated with a d... View full answer
Get step-by-step solutions from verified subject matter experts
