Write a switch statement that tests the value of the char variable response and performs the following actions: if response is y, display Your request is being processed if response is n, display Thank you anyway for your consideration if response is h, display Sorry, no help is currently available for any other value of response, display Invalid entry; please try again
.
.
Click on the title for the solution
.
.
switch(response)
{ case 'y': cout<<"Your request is being processed";break;
case 'n': cout<<"Thank you anyway for your consideration";break;
case 'h': cout<<"Sorry, no help is currently available";break;
default: cout <<"Invalid entry; please try again";break;}
.
Click on the title for the solution
.
.
This is the answer:
:
switch(response)
{ case 'y': cout<<"Your request is being processed";break;
case 'n': cout<<"Thank you anyway for your consideration";break;
case 'h': cout<<"Sorry, no help is currently available";break;
default: cout <<"Invalid entry; please try again";break;}
Comments
Post a Comment