2. Rewrite the following code fragment so that a multi-way if/else is used instead of the switch statement. int value; char ch; cin >> ch; switch( ch) { case 'A': value = 10; break; case 'P': cin >>...

Q: Rewrite the following code fragment so that a MULTI-WAY IF/ELSE is USED instead of the switch statement. * use C++ program2. Rewrite the following code fragment so that a multi-way if/else is used instead of the switch<br>statement.<br>int value;<br>char ch;<br>cin >> ch;<br>switch( ch) {<br>case 'A':<br>value = 10;<br>break;<br>case 'P':<br>cin >> value;<br>break;<br>case 'T':<br>value = ch;<br>break;<br>case 'V':<br>value = ch + 1000;<br>break;<br>default:<br>value = 50;<br>}<br>cout << value« '\n';<br>

Extracted text: 2. Rewrite the following code fragment so that a multi-way if/else is used instead of the switch statement. int value; char ch; cin >> ch; switch( ch) { case 'A': value = 10; break; case 'P': cin >> value; break; case 'T': value = ch; break; case 'V': value = ch + 1000; break; default: value = 50; } cout < value«="">

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here