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

Ask the user to enter four quarterly sales figures for six divisions of a compan

ID: 3641500 • Letter: A

Question

Ask the user to enter four quarterly sales figures for six divisions of a company. The figures should be stored in a two dimensional array. Once the figures are entered, the program should display the following data:

A list of the sales figures by division (completed)
Each division's increase or decrease from the previous quarter (This will not be displayed for the first quarter.)
The total sales for the quarter (completed)
The company's increase or decrease from the previous quarter (This will not be displayed for the first quarter.)
The average sales for all divisions that quarter (completed)
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