So I need to do this following program and I'm totally confused at the moment. Can someone please help me? Your help will be greatly appreciated.
Objective:
1. Write a program that incorporates function modules
2. Use appropriate function declarations
3. Use function headers and write function procedure
4. Use function Calls appropriately
Problem statement:
Write a program that displays the commission of a salesman using two functions. The first function is called to prompt and get sales amount from user and the sale amount is returned to the main module. The second function is called to calculate the commission and return the value to the main module. The Main Module will display the sales and the commission.
Procedure or Details:
The following table is used to calculate the commission:
Sale Amount Commission
---------------- ---------------------------
0 – 999 3.5%
1000 – 1999 4.0%
2000 – 2999 4.5%
3000 or above 5.0%
Your program will continue asking for the sales until the user types a negative number for sales, then the program should ask the user, if he/she wants to terminate the program. The program terminates if the user answers yes or y.