Using a switch Statement
In this exercise, you use what you have learned about the switch statement to study some C++ code, and then answer Questions.
First, examine the following code:
int numValue = 10;int answer = 0;switch(numValue){case 5: answer += 5;case 10: answer += 10;case 15: answer += 15;break;case 20: answer += 20;case 25: answer += 25;default: answer = 0;break;}cout ≪ "Answer: " ≪ answer ≪ endl;What is the value of answer if the value of numValue is 20?
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.