Question: Step 1: Write the code shown below and debug it please having issues getting it to work. Please help using C++ Step 2: Modify the

Step 1: Write the code shown below and debug it please having issues getting it to work. Please help using C++

Step 1: Write the code shown below and debug it please having

Step 2: Modify the code to use functions. Create a getInput function, a calcTotal function and a displayResults function. The purpose of getInput is to prompt the user for input and assign values to the 2D array. The purpose of the caclTotal function is to process the 2D Array and accumulate the total sales. The purpose of the displayResults functionn is to display the entire 2D array for quarterly sales as well as the total sales. The main function should consist of variable declarations and function calls. Do not use global variables. Pass the data through functions parameters or value returning functions.

1 /7 This program demonstrates a two-dimensional array. #include #include using namespace std 4 6 int main() const int NUM_DIVS 3; const int NUM_QTRS 4 double sales[NUM_DIVS]INUM_QTRS]; // Array with 3 rows and 4 columns. double totalSales 0 int div, qtr; //Number of divisions //Number of quarters // To hold the total sales. /7 Loop counters. 12 cout >sales[div]lqtr]; cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!