how can i use the switch statement to find a value in a range?
example like,
#include <stdio.h>
void main()
{
int monthly_sales;
double monthly_income;
printf("Enter your monthly sales amount > ");
scanf("%d", &monthly_sales);
switch(monthly_sales)
{
case 50000: // i want make this in a range, greater than or equal.
{
monthly_income = 375 + ( monthly_sales * 16 / 100);
printf("\nMonthly Income = $ %.2f\n\n", monthly_income);
break;
}
}
}
so how do with it ?
by the way, i would like to ask about how to write the pseudocode in switch statement ?
thanks.