Write a program that stores these values into a 2-Darray. Rows represent months, and columns represent sales regions. The cells represent sales figures: 6545 6420 6541 4568 9280 9874 1258 6000 3214 8452 5050 7412 3650 8544 8523 2140 5222 9632 3250 9512 1478 3659 4500 2589 4521 3200 3698 6900 3205 8451 2630 4722 9562 5024 8744 3568 Then process this 2-D array and output the totel annual sales by months (ie sum the rows) Your output should resemble ths and note that you wil also want tocreate a 12 ciement string arrav withthe months

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.4: Arrays As Arguments
Problem 6E: (Electrical eng.) Write a program that declares three one-dimensional arrays named volts, current,...
icon
Related questions
Question
100%
This question requires C++ and Edipse or Replit IDE works.
PART ONE======-
Write a program that stores these values into a 2-Darray Rows represent months, and columns represent sales regions.
The cells represent sales figures:
6545
6420
6541
4568
9280
9874
1258
6000
3214
8452
5050
7412
3650
8544
8523
2140
5222
9632
3250
9512
1478
3659
4500
2589
4521
3200
3698
6900
3205
8451
2630
4722
9362
5024
8744
3568
Then proces this 2-D array and outout thetofalannua sale by months e sum the rows) Yor outout should resemble
Transcribed Image Text:This question requires C++ and Edipse or Replit IDE works. PART ONE======- Write a program that stores these values into a 2-Darray Rows represent months, and columns represent sales regions. The cells represent sales figures: 6545 6420 6541 4568 9280 9874 1258 6000 3214 8452 5050 7412 3650 8544 8523 2140 5222 9632 3250 9512 1478 3659 4500 2589 4521 3200 3698 6900 3205 8451 2630 4722 9362 5024 8744 3568 Then proces this 2-D array and outout thetofalannua sale by months e sum the rows) Yor outout should resemble
Then process this 2-D array and output the total annual sales by months (i.e. sum the rows). Your output should resemble
this, and note that you will also want to create a 12 element string array with the months:
Jan sales: 19506
Feb sales: 23842
Mar sales: 18472
Apr sales: 20914
May sales: 20717
Jun sales: 1694
Jul sales: 14248
Aug sales: 10748
Sep sales: 11419
Oct sales: 18556
Nov sales: 16914
Dec sales: 17336
For your convenience, here's code that initializes the array:
int sales(MONTHS (REGIONS] -
( (6545, 6428, 6541),
(4588, 9280, 9874),
(1258, 6000, 3214),
(8452, 5050, 7412),
(3650, 8544, B523),
(2140, 5222, 9632),
(3250, 9512, 1478),
(3659, 4588, 2589),
(4521, 3200, 3698),
(6990, 3205, 8451),
(263e, 4722, 0562),
(5224, 8744, 3568) );
PART TWO --
Take your code from Part Three above and now modify it such that the output is the total sales across all regions (i.e. sum
the columns). Your output should resemble this:
Region 1 sales: 52717
Region 2 sales: 74399
Region 3 sales: 74542
Transcribed Image Text:Then process this 2-D array and output the total annual sales by months (i.e. sum the rows). Your output should resemble this, and note that you will also want to create a 12 element string array with the months: Jan sales: 19506 Feb sales: 23842 Mar sales: 18472 Apr sales: 20914 May sales: 20717 Jun sales: 1694 Jul sales: 14248 Aug sales: 10748 Sep sales: 11419 Oct sales: 18556 Nov sales: 16914 Dec sales: 17336 For your convenience, here's code that initializes the array: int sales(MONTHS (REGIONS] - ( (6545, 6428, 6541), (4588, 9280, 9874), (1258, 6000, 3214), (8452, 5050, 7412), (3650, 8544, B523), (2140, 5222, 9632), (3250, 9512, 1478), (3659, 4588, 2589), (4521, 3200, 3698), (6990, 3205, 8451), (263e, 4722, 0562), (5224, 8744, 3568) ); PART TWO -- Take your code from Part Three above and now modify it such that the output is the total sales across all regions (i.e. sum the columns). Your output should resemble this: Region 1 sales: 52717 Region 2 sales: 74399 Region 3 sales: 74542
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,