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 re-write of the following code segment using a switch-case statement instead of if/else?
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 ==1){
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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!