If you have consecutive ranges, the most robust approach is to "step down the stairs" instead of giving ranges which might end up in subtle mistakes. E.g. assuming you have the ranges ...0, 1...999, 1000...1999, 2000..., a possible solution might be from top-down:
if (n >= 2000) {
} else if (n >= 1000) {
} else if (n >= 1) {
} else {
}
[EDIT]
Now that you mention your instructor wants
switch
(e.g. for didactic reason), you might calculate a range indicator and use that in the switch. E.g.
int lower_bound = n >= 2000 ? 2000
: n >= 1000 ? 1000
: n >= 1 ? 1
: 0
;
switch(lower_bound)
{
case 2000:
break;
case 1000:
break;
case 1:
break;
default:
assert(!"out-of-range");
break;
}
[/EDIT]
Regards
Andi