Quote:
I know that in the if/else statement, you can have eqns like y=x+3 and then enter in an x value in the if statement to calculate what y is. I've been trying to do the same for the switch statement but I can't.
You might want to give an example of what you mean in terms of if/else.
Quote:
Also, I want to add all the cases together, like case 1 = case 1+case2+case3, then case 2 = case 2 +case3
What do you mean by "add"? One feature (or 'misfeature', depending on your point of view) is that of 'fall-through', as in once a case is reached, control moves to the following case in the absence of say, a break.