A large company pays its salespeople on a commission basis. The salespeple each receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Develop a C++ program that uses a while statement to input each salesperson’s gross sales for last week and calculates and displays that salesperson’s earnings. Process one salesperson’s figures at a time.

a) Account number (an integer)
b) Balance at the beginning of the month
c) Total of all items charged by this customer this month
d) Total of all credits applied to this customer's account this month
e) Allowed credit limit
```
Enter sales in dollars (-1 to end): 5000.00
Salary is: $650.00

Enter sales in dollars (-1 to end): 6000.00
Salary is: $740.00

Enter sales in dollars (-1 to end): 7000.00
Salary is: $830.00

Enter sales in dollars (-1 to end): -1
```

Top:
For an arbitrary number of salespeople, determine each salesperson’s earnings for the previous week
First refinement:
For each salesperson
Input the salesperson’s sales for the week
Calculate and print the salesperson’s wages for the week
Second refinement:
Prompt the user for the first salesperson’s sales in dollars
Input the first salesperson’s sales in dollars
While the sentinel value (-1) has not been entered for the sales
Calculate the salesperson’s wages for the week as 200 dollars added to 9 percent of the salesperson’s sales (calculated by multiplying the sales with .09)
Print the salesperson’s wages for the week
Prompt the user for the next salesperson’s sales in dollars
Input the next salesperson’s sales in dollars

Computer Science & Information Technology

You might also like to view...

The default numerical field calculation for a PivotTable is ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

In SharePoint, ________ libraries allow folders, versioning, and check out

A) Form B) Picture C) Slide D) Document

Computer Science & Information Technology