Computer Science, asked by alwinjoseph6911, 10 months ago

Rewrite the following code using if statement
Switch (ch)
{
Case 'a': cout <<'’Abacus''; break;
Case 'b':cout <<''binary'';break;
Default:cout <<'’invalid input'’;
}

Answers

Answered by johnmick
0

Answer:

if(ch == 'a') {

cout <<'’Abacus'';

}

if(ch == 'b') {

cout <<'’binary'';

}

else {

cout <<'’invalid input'’;

}

Similar questions