Question: // This program will read in the quarterly sales transactions for a given number // of years. It will print the year and transactions in

 // This program will read in the quarterly sales transactions for

// This program will read in the quarterly sales transactions for a given number // of years. It will print the year and transactions in a table format. // It will calculate year and quarter total transactions. // PLACE YOUR NAME HERE #include  #include  using namespace std; const int MAXYEAR = 10; const int MAXCOL = 5; typedef int SalesType[MAXYEAR][MAXCOL]; // creates a new 2D integer data type void getSales(SalesType, int&); // places sales figures into the array void printSales(SalesType, int); // prints data as a table void printTableHeading(); // prints table heading int main() { int yearsUsed; // holds the number of years used SalesType sales; // 2D array holding the sales transactions getSales(sales, yearsUsed); // calls getSales to put data in array printTableHeading(); // calls procedure to print the heading printSales(sales, yearsUsed); // calls printSales to display table return 0; } //***************************************************************************** // printTableHeading // // task: This procedure prints the table heading // data in: none // data out: none // //***************************************************************************** void printTableHeading() { cout > numOfYears; // Fill in the code to read and store the next value } //***************************************************************************** // printSales // // task: This procedure prints out the information in the array // data in: an array containing sales information // data out: none // //***************************************************************************** void printSales(SalesType table, int numOfYears) { // Fill in the code to print the table } 

Exerise 6: (Optional) Look at the following table that contains quarterly sales small s for three years of a company. Each of the quarterly transactions are integers (number of sales) and the year is also an integer. YEAR Quarter Quarter 2 Quarter 3 Quarter 4 2000 2001 2002 72 82 64 80 90 78 60 43 58 100 98 84 rray consisting of 3 rows and 5 columns. We could use a two-dimensional a Even though there are only four quarters we need 5 columns (the first column holds the year) Retrieve quartsal.cpp from the Lab 7 folder. The code is as follows

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!