Company pays its employees based on a commission of the sales they make as shown below, Monthly Sales Commission Rate:
First 50,000 = 10%, Next 100,000 = 15%, Next 200,000 = 20%, Above 350,000 = 25%. Additionally, all employees are entitled to a commission of 20,000 per month.
Write a C++ program that allows you to input an employee’s monthly sales, computes the commission due to the employee and displays it.
#include <iostream>
using namespace std;
int main()
{
double sales,commission,tcommission;
cout << "Enter Employee monthly sales" << endl;
cin>>sales;
if(sales>=50000){
commission=0.1*sales;
}else if(sales>50000 && sales<=100000){
commission=0.15*sales;
}
else if(sales>10000 && sales<=200000){
commission=0.20*sales;
}
else if(sales>350000){
commission=0.25*sales;
}
tcommission=commission+20000;
cout<<"The total commission is: "<<tcommission<<endl;
return 0;
}
Comments
Leave a comment