any help please

Hi,

switch ( <variable> ) {
case this-value:
Code to execute if <variable> == this-value
break;
case that-value:
Code to execute if <variable> == that-value
break;
...
default:
Code to execute if <variable> does not equal the value following any of the cases
break;
}


Could anyone explain to me, how a complete code with stuff in it looks like, just give an example?
Seems like you have all you need. Where is your problem?
(variable has to be of an integer type [int, char, ...])
but don't I need to input something for the this-value and that-value or something?
And for the '<variable>' as well.
Just go ahead. Or where is your problem(see above)?
Topic archived. No new replies allowed.