#include <iostream>
using namespace std;
int main(){
int hours;
cout<<"Enter the number of hours worked: ";
cin>>hours;
double monthlySalary=10000;
switch(hours){
case 0 ... 159:
monthlySalary-=monthlySalary*0.1;
break;
case 161 ... 500:
monthlySalary+=monthlySalary*0.1;
break;
}
cout<<"Your monthly salary: "<<monthlySalary<<"\n\n";
return 0;
}
Comments
Leave a comment