Array Help

So this program is suppose to use arrays to get the inventory of four different sizes from seven differnt colleges. Then display the totals in 9 different ways. I have then input working well, but I am just lost on how to program the output. any ideas or direction? BTW, I am new to c++

#include <iostream>
#include <iomanip>

using namespace std;

int main ()
{
const int NUM_SIZE = 4;
const int NUM_COLLEGE = 7;

int inventory[NUM_SIZE][NUM_COLLEGE];
int college,
size,
st,
mt,
lt,
xlt,
ct,
tqoh;

cout << setprecision(1)
<< setiosflags(ios::fixed)
<< setiosflags(ios::showpoint);

// Get the inventory

cout << "Please enter " << NUM_SIZE
<< " inventories per size." << endl;
cout << "Separate the number of each inventory size by one or more spaces." << endl;

for (college = 0; college <NUM_COLLEGE; ++ college)
{
cout << endl << endl;
cout << "Inventory for college " << college + 1 << ": ";
for (size = 0; size <NUM_SIZE; ++size)
cin >> inventory[college][size];
}

// calulate and display the output



cout << endl << endl;
cout << setw(50) << "Inventory Report" << endl;
cout << setw(45) << "College" << endl;
cout << setw(60) << "1 2 3 4 5 6 7 Total" << endl;
cout << setw(17) << "Small" << setw(3) << endl;
cout << setw(17) << "Medium" << setw(3) << endl;
cout << setw(10) << "Size" << endl;
cout << setw(17) << "Large" << setw(3) << endl;
cout << setw(17) << "XLarge" << setw(3) << endl;
cout << setw(17) << "College Total" << endl;
cout << endl << endl;
cout << setw(17) << "Total Quantity On Hand" << setw(5) << tqoh << endl;

return 0;
}
Topic archived. No new replies allowed.