Question #55526

One large chemical company pays its sales people on a commission basis. The salespeople each receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9 percent of $5000, or total of $650. Develop a C++ program inputs each salesperson's gross sales for last week and calculates and displays that salesperson's earnings. process one salesperson's figures at a time.

Expert's answer

#include <iostream>
#include <string>

using namespace std;

int main(){

//variable for salesperson's gross sales for last week
float salespersonGrossSales;
//variable for Salesperson's earnings
float salespersonEarnings=0;
//promt user to enter salesperson's gross sales for last week
cout<<"Enter salesperson's gross sales for last week: ";
cin>>salespersonGrossSales;
//The salespeople each receive $200 per week plus 9 percent of their gross sales for that week
salespersonEarnings=200+(salespersonGrossSales*0.09);
//calculates and displays that salesperson's earnings.
cout<<"Salesperson's earnings: $"<<salespersonEarnings<<"\n\n";
//delay
system("pause");
return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS