Complete TRY THIS Exercise 11. If necessary, create a new project named ModifyThis12 Project, and save it

Question:

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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: