Create a struct called Salesperson which contains (1) the salesperson's full name, (2) an array of 6 values containing the salesperson's monthly sales over a 6-month period, (3) the total sales (total sales over 6 months), and (4) the salesperson's bonus pay. You have an array of 6 Salesperson structs initialized with the following: Name 6-month Sales Figures Bob James 150.00 2125.00 2173.25 1115.00 4136.37 2543.56 Jim Lincoln 8723.19 7397.21 5982.15 8319.54 7298.31 7490.02 Larry Fredrick 9384.12 9740.98 8940.34 8876.34 7093.23 9830.11 Clint Allan 938.25 834.98 976.29 994.56 912.05 849.12 David Kahn 1832.65 972.34 983.65 1289.28 1197.30 989.41 Alex Simpson 236.80 4527.00 1237.00 2789.45 6548.90 1798.60

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

From the image attached, using C not C++, provide the code, as well as the required output. NOTE: Do not hard code, as all inputs are required for the output.

Create a struct called Salesperson which contains (1) the salesperson's full name, (2) an array of
6 values containing the salesperson's monthly sales over a 6-month period, (3) the total sales
(total sales over 6 months), and (4) the salesperson's bonus pay.
You have an array of 6 Salesperson structs initialized with the following:
Name
6-month Sales Figures
Bob James
150.00 2125.00 2173.25 1115.00 4136.37 2543.56
Jim Lincoln
8723.19 7397.21 5982.15 8319.54 7298.31 7490.02
Larry Fredrick 9384.12 9740.98 8940.34 8876.34 7093.23 9830.11
Clint Allan
938.25 834.98 976.29
994.56 912.05 849.12
David Kahn
1832.65
972.34 983.65 1289.28 1197.30 989.41
Alex Simpson
236.80 4527.00 1237.00 2789.45 6548.90 1798.60
For each Salesperson calculate the total sales over 6 months.
Calculate the average total sales of the 6 Salespersons i.e. (total sales for Salesperson[0] + total
sales for Salesperson[1] + ... + total sales for Salesperson[5])/6.
If a Salesperson's total sales is above the average total sales, that sales person gets a pay bonus
of $5000 at the end of the year, otherwise, the bonus pay for the salesperson is $0. At the end of
your program print a list of salespersons receiving the bonus pay.
Transcribed Image Text:Create a struct called Salesperson which contains (1) the salesperson's full name, (2) an array of 6 values containing the salesperson's monthly sales over a 6-month period, (3) the total sales (total sales over 6 months), and (4) the salesperson's bonus pay. You have an array of 6 Salesperson structs initialized with the following: Name 6-month Sales Figures Bob James 150.00 2125.00 2173.25 1115.00 4136.37 2543.56 Jim Lincoln 8723.19 7397.21 5982.15 8319.54 7298.31 7490.02 Larry Fredrick 9384.12 9740.98 8940.34 8876.34 7093.23 9830.11 Clint Allan 938.25 834.98 976.29 994.56 912.05 849.12 David Kahn 1832.65 972.34 983.65 1289.28 1197.30 989.41 Alex Simpson 236.80 4527.00 1237.00 2789.45 6548.90 1798.60 For each Salesperson calculate the total sales over 6 months. Calculate the average total sales of the 6 Salespersons i.e. (total sales for Salesperson[0] + total sales for Salesperson[1] + ... + total sales for Salesperson[5])/6. If a Salesperson's total sales is above the average total sales, that sales person gets a pay bonus of $5000 at the end of the year, otherwise, the bonus pay for the salesperson is $0. At the end of your program print a list of salespersons receiving the bonus pay.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

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