switch (level)
{
case 'A':
salary2 = salary1 + 500;
break;
case 'B':
salary2 = salary1 + 300;
break;
case 'C':
salary2 = salary1;
break;
case 'D':
salary2 = salary1 - 200;
break;
default:
salary2 = salary1;
break;
}
NOTE:can only use in equal-value