Answer to Question #55526 in C++ for justice

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.
1
Expert's answer
2015-10-14T03:40:34-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS