Question: Which answer is the correct re - write of the following code segment using a switch - case statement instead of if / else ?
Which answer is the correct rewrite of the following code segment using a switchcase statement instead of ifelse
We assume that all variables are already defined.
int choice;
cin choice; input the choice number and store as integer.
Respond to the user's menu selection.
if choice
cout"For how many months? months;
charges months ADULT;
cout"The total charges are $ charges
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
