problem starts at an unknown value.
the amount of options for the switch statement is dependent on the user.
lets say that there are 3 options made by the user via his inputs.
can i make a switch statement that adapts to the user input?
input:
option 1
option 2
option 3
display:
[1]option 1
[2]option 2
[3]option 3
choice:
then code-wise the switch statement goes like this.
switch(choice)
case (userinput1): something happens break;
case (userinput2): something happens break;
case (userinput3): something well, happens break;
default: invalid input please choose again.break;
in reality you wont know how many "case"s there will be it just depends on how many inputs the user makes.