Question: A program uses a char variable named department and two double variables named salary and raise. The department variable contains one of the following letters
A program uses a char variable named department and two double variables named salary and raise. The department variable contains one of the following letters (entered in either uppercase or lowercase): A, B, C, or D. Employees in departments A and B are receiving a 2% raise. Employees in department C are receiving a 1.5% raise, and employees in department D are receiving a 3% raise. Using the switch statement, write the C++ code to calculate the appropriate raise amount.
Step by Step Solution
3.66 Rating (168 Votes )
There are 3 Steps involved in it
switch toupperdepartment case A ca... View full answer
Get step-by-step solutions from verified subject matter experts
