Question: C++ Programming Please answer question B only a. The lockdown that has been imposed in the country have caused many businesses to be at a


C++ Programming
Please answer question B only
a. The lockdown that has been imposed in the country have caused many businesses to be at a loss. This includes Caf Coffee which has four branches here in Malaysia. The continuous losses have forced the owners to close down one of the cafs. Table 1 shows the sales made by each of its branches for the year 2019 to 2021. Declare a 2D array called sales that can store this information. Initialise the array with values shown in Table 1. Table 1: Sales made by Caf Coffee branches between 2019-2021 Caf No 2021 2020 2019 1 319 360 389 2 297 343 369 3 305 314 347 4 338 355 332 All values are in thousands (5 Marks) b. Based on the 2D array that you have declared and initialised in Question 2(a), write codes that will calculate the average sales for each of the four branches. Declare 1D array called average to store the average value. Then, display the average sales of each caf as the output. Make sure to declare all variables that you have used other than the sales array. (8 Marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
