attempting to display a table from an array, was wondering if anyone could assist in this matter, learning C++ and attempting to finish this course.
Requirement is to display a table with information.
Here is the code i have so far.
/*This file Produces a table of total number of cars sold and the number of cars
*sold by each salesperson.
*
*Input: Number of Salespersons and Number of Cars sold
*Output: Total Number of Cars sold by each salesperson.
******************************************************************************/
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
const int MODEL_CARS = 10;
const int NUM_SALESPERSONS = 8;
const int CARS_SOLD[MODEL_CARS][NUM_SALESPERSONS]
= { {0, 0, 2, 0, 5, 6, 3, 0},
{5, 1, 9, 0, 0, 2, 3, 2},
{0, 0, 0, 1, 0, 0, 0, 0},
{1, 1, 1, 0, 2, 2, 2, 1},
{5, 3, 2, 0, 0, 2, 5, 5},
{2, 2, 1, 0, 1, 1, 0, 0},
{3, 2, 5, 0, 1, 2, 0, 4},
{3, 0, 7, 1, 3, 5, 2, 4},
{0, 2, 6, 1, 0, 5, 2, 1},
{4, 0, 2, 0, 3, 2, 1, 0} };
{
for (int MODEL_CARS = 0; MODEL_CARS < 10; MODEL_CARS++)
{
for (int NUM_SALESPERSONS = 0; NUM_SALESPERSONS < 8;
NUM_SALESPERSONS++);
}
}
}
Thanks for any and all help.