A computer company pays its employees salaries based on amount of monthly sales made by each salesperson. The number of salespersons is 40. Write a well-documented C++ program tconsisting of two function as described below, 1. A function that accepts the monthly sales (double) as a parameter and returns the total salary amount in BD as percentage of the sales amount as shown in the following table. Monthly Sales $ 5000 S 8000 S 12750 > 12750 Salary % 12.5 20 24 30

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Please Use C++
> lab - Bb Collaborate
O University of Bahrain
2 Activity Stream
O File
C:/Users/Zahra/Downloads/CSC%20103%20Lab%20Quiz%232 %20DEC2021%20(1).html
E Reading list
Apps M Gmail
YouTube Maps
A computer company pays its employees salaries based on amount of monthly sales made by each salesperson. The number of salespersons is 40. Write a well-documented
C++ program tconsisting of two function as described below,
1. A function that accepts the monthly sales (double) as a parameter and returns the total salary amount in BD as percentage of the sales amount as shown in the following
table.
Monthly Sales
S 5000
< 8000
S 12750
> 12750
Salary %
12.5
20
24
30
2. A function main that performs the following steps for each śalesperson:
a. Prompts the user to enter from the keyboard the salesperson id (int) and the amount of sales made by a salesperson (double).
b. Calls the above-defined fumction to calculate the total salary.
c. Calculate the net salary (NET) received a salesperson: NET = salary - VAT - MI, where the values of VAT and VAT (medical insurance) are specified according to the
following table.
Total Salary in BD
< 300.000
S 500.000
< 750.000
> 750.000
VAT %
3.5
10
12.5
17.5
MI %
10
10
15
15
d. Print the salesperson id, amounts of total salary, VAT, MI, and NET at the beginning of a new line separated by tabs. All double values must be printed with 3 decimal
2:22 PM
P Type here to search
72°F Sunny
3.
12/23/2021
21
Transcribed Image Text:> lab - Bb Collaborate O University of Bahrain 2 Activity Stream O File C:/Users/Zahra/Downloads/CSC%20103%20Lab%20Quiz%232 %20DEC2021%20(1).html E Reading list Apps M Gmail YouTube Maps A computer company pays its employees salaries based on amount of monthly sales made by each salesperson. The number of salespersons is 40. Write a well-documented C++ program tconsisting of two function as described below, 1. A function that accepts the monthly sales (double) as a parameter and returns the total salary amount in BD as percentage of the sales amount as shown in the following table. Monthly Sales S 5000 < 8000 S 12750 > 12750 Salary % 12.5 20 24 30 2. A function main that performs the following steps for each śalesperson: a. Prompts the user to enter from the keyboard the salesperson id (int) and the amount of sales made by a salesperson (double). b. Calls the above-defined fumction to calculate the total salary. c. Calculate the net salary (NET) received a salesperson: NET = salary - VAT - MI, where the values of VAT and VAT (medical insurance) are specified according to the following table. Total Salary in BD < 300.000 S 500.000 < 750.000 > 750.000 VAT % 3.5 10 12.5 17.5 MI % 10 10 15 15 d. Print the salesperson id, amounts of total salary, VAT, MI, and NET at the beginning of a new line separated by tabs. All double values must be printed with 3 decimal 2:22 PM P Type here to search 72°F Sunny 3. 12/23/2021 21
lab - Bb Collaborate
O University of Bahrain
Activity Stream
O File | C:/Users/Zahra/Downloads/CSC%20103%20Lab%20Quiz%232%20DEC2021%20(1).html
E Reading list
Apps M Gmail
YouTube
A Maps
Total Salary in BD
< 300.000
S 500.000
S750.000
> 750.000
VAT %
3.5
10
12.5
17.5
MI %
10
10
15
15
d. Print the salesperson id, amounts of total salary, VAT, MI, and NET at the beginning of a new line separated by tabs. All double values must be printed with 3 decimal
places.
SAMPLE RUN
Enter the salesperson id and his sales please: 1102 2000
1102 250.000 8.750 25.000 216.250
Enter the salesperson id and his sales please: 1215 7500
1215 1500.000 262.500 225.000 1012.500
......
Enter the salesperson id and his sales please: 1144 20000
1144 6000.000 1050.000 900.000 4050.000
2:23 PM
P Type here to search
72°F Sunny
へ
21
ツ
12/23/2021
Transcribed Image Text:lab - Bb Collaborate O University of Bahrain Activity Stream O File | C:/Users/Zahra/Downloads/CSC%20103%20Lab%20Quiz%232%20DEC2021%20(1).html E Reading list Apps M Gmail YouTube A Maps Total Salary in BD < 300.000 S 500.000 S750.000 > 750.000 VAT % 3.5 10 12.5 17.5 MI % 10 10 15 15 d. Print the salesperson id, amounts of total salary, VAT, MI, and NET at the beginning of a new line separated by tabs. All double values must be printed with 3 decimal places. SAMPLE RUN Enter the salesperson id and his sales please: 1102 2000 1102 250.000 8.750 25.000 216.250 Enter the salesperson id and his sales please: 1215 7500 1215 1500.000 262.500 225.000 1012.500 ...... Enter the salesperson id and his sales please: 1144 20000 1144 6000.000 1050.000 900.000 4050.000 2:23 PM P Type here to search 72°F Sunny へ 21 ツ 12/23/2021
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY