1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#include <iostream>
using namespace std;
int main()
{
//declaring array
double sales[10][3] = {{2400, 3500, 2000}, {1500, 7000, 1000}, {600, 450, 2100},
{790, 240, 500}, {1000, 1000, 1000}, {6300, 7000, 8000,}, {1300, 450, 700},
{2700, 5500, 6000}, {4700, 4800, 4900}, {1200, 1300, 400}};
//enter data
//display
for (int person = 0; person < 10; person += 1)
{
cout << "Sales Person " << person + 1 << ": " << endl;
for (int month = 0; month < 3; month += 1)
{
cout << "Month " << month + 1 << ": ";
cout << sales[person][month] << endl;
}//end for
} //end
cin.get();
}
|