Originally Posted by Prof. Krauf
What's that ??
For your question ... It's better to use nested If
s than using Switch Case
. Case checks for a particular value, but you need to check a range.
So, do it something like this :
if( Salary > 10000 )
Commission = 12;
else if( Salary > 5000 )
Commission = 10;
Commission = 8;