Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void salesSummary() {
- array <array <int, 5>, 4> arr;
- for (int i = 0; i < 4; i++) {
- cout << "Please enter sales for salesman " << i + 1 << endl;
- for (int j = 0; j < 5; j++) {
- cout << "Product " << j + 1 << endl;
- int salesPerDay;
- int productTotalsales = 0;
- for (int k = 0; k < 2; k++) {
- cout << "Please enter sales for day " << k+1 << endl;
- cin >> salesPerDay;
- productTotalsales += salesPerDay;
- }
- arr[i][j] = productTotalsales;
- }
- }
- cout <<"Salesman"<<'\t'<< "product1 " << '\t' << "product2" << '\t' << "product3"
- << '\t' << "product4" <<'\t' << "product5" << endl;
- for (int i = 0; i < 4; i++) {
- cout << endl;
- cout << "Salesman " << i+1 << '\t';
- for (int j = 0; j < 5; j++) {
- cout << arr[i][j] << '\t' << '\t';
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement