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