Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DESCRIPTION: There are 4 sales representatives in a company and these representatives market 5 different products. Each sales representative prepares a voucher for each different
DESCRIPTION: There are 4 sales representatives in a company and these representatives market 5 different products. Each sales representative prepares a voucher for each different type of product sold daily. Each sales representative organizes 0-5 receipts daily. PROBLEM: Write a program that summarizes all sales made in the last month, using all the last month's receipts. All sales made must be recorded in a two-dimensional array named sales. After processing last month's sales, print the results in a table like following SALES TABLE S01 S02 S03 S04 Average P101 27 16 9 8 15 P102 23 20 14 7 16 P103 18 17 15 12 15.5 P104 14 15 14 18 15.25 P105 20 16 19 25 20 Average 20.4 16.8 14.2 14 Expectations from the program: 1. It is expected that a two-dimensional array will be used. 2. Each cell must be filled in by the user. Expectations from the program: 1. It is expected that a two-dimensional array will be used. 2. Each cell must be filled in by the user. 3. In the table produced as output, the average of the number of total each sales of that product should be written on the far right, and the average of total number of each sales of that sales representative at the bottom. To do this instruction you have to create two different one-dimensional arrays in double. 4. According to the table, the salesperson with the biggest average of sales will be the salesperson of the month and the best selling product that has biggest average of sales representative will be determined and shown in the printout. 5. Finally this one month sales will be categorized. For this, the mode calculation will be made and the category will be determined according to the mode table. You have to search and apply calculation of mode if you have no idea about mode calculation. MODE TABLE MODE VALUE 1-10 11-20 21-30 CATEGORY BAD GOOD EXCELLENT SAMPLE OUTPUTS Enter sales[0][0]: 27 Enter sales [0][1]: 16 Enter sales[][2]: 9 Enter sales [0] [3]: 8 Enter sales [1] loj: 23 Enter sales [1][1]: 20 Enter sales [1][2]: 14 Enter sales [1] [3]: 7 Enter sales [2][0]: 18 Enter sales [2][1]: 17 Enter sales [2][2]: 15 Enter sales [2] [3]: 12 Enter sales [3][0]: 14 Enter sales [3][1]: 15 Enter sales [3][2]: 14 Enter sales [3][3]: 18 Enter sales [4] [0]: 20 Enter sales [4][1]: 16 Enter sales [4][2]: 19 Enter sales [4][3]: 25 Entered receipt table for one-month: s0i SO2 SO3 S04 Average P101 27 16 9 8 15.00 P102 23 20 14 7 16.00 P103 18 17 15 12 15.50 P104 14 15 14 18 15.25 P105 20 16 19 25 20.00 Avg 20.40 16.80 14.20 14.00 The salesperson of the month is with 20.4 is s01 The product of the month is with 20.0 is P105 Mode 14 -> GOOD SALES
Step 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