Answer to Question #11243 in C++ for Chad Dylan Cooper
State whether the following are valid switch statements. If not, explain why. Assume that n and digit are int variables.
How can I do this?
switch (digit / 4)
{
case 0,
case 1:
cout << "low." < endl;
break;
case 1,
case 2:
cout << "middle." < endl;
break;
case 3:
cout << "high." < endl;
My error is on the line 12
-expected unqualified-id before "switch"
-expected `,' or `;' before "switch"
0
Answer in progress...
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment