In C++, my "switch" statement is okay when I ask it do evaluate ONE expression. (My number that I'm evaluating is one of ten single digits; I have ten cases for the ten digits.)
BUT, I have five separate digits to evaluate.
I can't believe that the only solution is to do:
etc.
Assuming that my question makes sense, how do I evaluate multiple expressions in a switch statement?
BUT, I have five separate digits to evaluate.
I can't believe that the only solution is to do:
Code:
switch (num1) { case 0:... case 9: } switch(num2) { case 0:... case 9: }
Assuming that my question makes sense, how do I evaluate multiple expressions in a switch statement?
Comment