Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that lets the user enter four quarterly salesfigures for six div

ID: 3618268 • Letter: W

Question

Write a program that lets the user enter four quarterly salesfigures for six divisions of a company. The figures should bestored in a two-dimensional array. Once the figures are entered,the program should display the following data for each quarter:

- A list of the sales figures by division
- Each division's increase or decrease from the previousquarter
- The total sales for the quarter
- The company's increase or decrease from the previous quarter
- The average sales for all divisions that quarter
- The division with the highest sales for that quarter

Explanation / Answer

By 2-dimensional, do you mean multi-dimensional? If so, you the representation of the 6 divisions and their quarterly figures would be as follows: double quarterly_sales[5][3]; The first value in brackets represents the columns in this case 6 (0 -5) and the second value the rows, which is 4. The columns will be used to refer to the division and the row will be used to refer to the quarter. For example, quarterly_sales[0][3] would refer to the 1st division's 4th quarter sales. That increase or decrease in sales from quarter to quarter can be calculated as the difference of current quarter from last quarter( or current quarter - last quarter) Some of the code for this might look something similar to the following: double quarterly_sales[5][3]; double total_sales[3]; for(int i = 0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote