nested switch vs if/else

So I am making a program where it reads three characters like OFH and depending on the combination of the characters it makes different actions. Like it reads O then have like 5 options and each of this option will read F and have another 3 options or conditions and then same goes for H.

What is the best way to approach this ? Using switch statements? If I do that i feel like its a mess, how about putting each switch statement in a function ? Any ideas ?
Instead of nested conditional loops, I would prefer to first read all the 3 characters and then have a switch or ( else if ) loop for all the combinations.

Ofcourse this also depends on what you want to do for each combination. If some tasks are common for all combinations, then you may want to club those tasks.
Topic archived. No new replies allowed.