Lab 5
Lab 5
Lab Exercises 5.
1. (Sales-Commission Calculator) Chakubanga chemical company pays its
salespeople on a commission basis. The salespeople receive TZS 200,000/= per
week plus 9% of their gross sales for that week. For example, a salesperson who
sells TZS 5,000,000/= worth of chemicals in a week receives TZS 200,000/= plus
9% of TZS 5,000,000/=, or a total of TZS 650,000/=. Develop a program that will
use scanf to input each salesperson’s gross sales for last week and display that
salesperson’s earnings. The program uses a function called "salesCommission"
which takes the gross sales as input and returns the earnings. Process one
salesperson's figures at a time. Here is a sample input/output dialog:
Enter sales in dollars (-1 to end): 5000000.00
Salary is: TZS 650000.00