I'd like to utilise switch, but I have a lot of cases; is there a way to save time? So far, the only remedy I've come across that I've attempted is:
switch (number)
{
case 1: something; break;
case 2: other thing; break;
...
case 9: .........; break;
}
I'm aiming to be able to do something along the lines of:
switch (number)
{
case (1 to 4): do the same for all of them; break;
case (5 to 9): again, same thing for these numbers; break;
}