Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write in c++ use arrays I have two 1-D arrays, Sales and Count, where each array is dimensioned by 6 (5salesmen, I ignore location/index 0).
write in c++ use arrays
I have two 1-D arrays, Sales and Count, where each array is dimensioned by 6 (5salesmen, I ignore location/index 0). The Sales array contains a total of all sales for each salesman and in the corresponding location of the array Count is the number of sales made by that salesman. Example: Sales[1] is 2050 dollars and Count[1] is 5 sales: so salesman 1 made 5 sales totaling $2050.00. Same set up for the other 9 salesmen. Write a program that has: a function Salesman that asks the user to enter the dollar amount of sales that the salesman has had. a function Num Sales that asks the user to enter the number of sales that the salesman has had. When asking the user for information on a particular salesman, you need to be specific to that salesman. i.e. Please enter the total of all sales for salesman 1: (the numbers should update through each of the salesmen, and similar for asking for the number of sales made by that salesman). Use the following information to run your program: Total Sales Number of Sales 3055 5 2177 7 4286 8 20647 11 212 2 Once your arrays are populated, have a function called PrtRpt. This function should create a text file called Report.txt where you will print the Salesman number, his total sales, and his average sales. This text file should be formatted to look like a report. My suggestion is to have three columns, one with the salesman number, the other with his total sales, and the last with his average. I do not want you to show the number of sales the salesman hadStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started