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
0
Answer:
if(ch == 'a') {
cout <<'’Abacus'';
}
if(ch == 'b') {
cout <<'’binary'';
}
else {
cout <<'’invalid input'’;
}
Similar questions
Political Science,
5 months ago
Math,
5 months ago
Economy,
5 months ago
English,
10 months ago
English,
10 months ago
Social Sciences,
1 year ago
Math,
1 year ago