C++   How to Program (Early Objects Version)
C++ How to Program (Early Objects Version)
10th Edition
ISBN: 9780134448824
Author: Paul Deitel; Harvey M. Deitel
Publisher: Pearson Education (US)
bartleby

Videos

Textbook Question
Book Icon
Chapter 7, Problem 7.21E

(Sales Summary) Use a two-dimensional array to solve the following problem. A company
has four salespeople (l to 4) who sell five different products (l to 5). Once a day, each salesperson
passes in a slip for each different type of product sold. Each slip contains the following:

  1. The salesperson number
  2. The product number
  3. The total dollar value of that product sold that day
Thus, each salesperson passes in between 0 and 5 sales slips per day. Assume that the information from all of the slips for last month is available. Write a program that will read all this information for last month's sales (one salesperson's data at a time) and summarize the total sales by salesperson by product. All totals should be stored in the two-dimensional array sales. After processing all the information for last month, print the results in tabular format with each of the columns represent- ing a particular salesperson and each of the rows representing a particular product. Cross total each row to get the total sales of each product for last month; cross total each column to get the total sales by salesperson for last month. Your tabular printout should include these cross totals to the right of the totaled rows and to the bottom of the totaled columns.

Blurred answer
Students have asked these similar questions
Python: You must make a rock paper scissors game Goal Ask the player if they pick rock paper or scissors ask for r, p, or s or 1, 2, or 3.   Have the computer chose its move Compare the choices and decide who wins Print the results Sub-goals Let the player play again Keep a record of the score e.g. (Player: 3 / Computer: 6) Keep a record of the games played (2 dimensional array) Use a  Functions for: Comparing player choices Error trap for choice
Correct answer will be upvoted else Multiple Downvoted. Computer science. assume mid=⌊max(array)+min(array)2⌋, where max and min — are capacities that track down the maximum and the base array components. At the end of the day, mid is the amount of the maximum and the base component of array separated by 2 adjusted down.    Then, at that point, the array is parted into two parts left and right. The left array contains all components which are not exactly or equal mid, and the right array contains all components which are greater than mid. Components in left and right maintain their relative control from array.    During the third step we pick which of the left and right arrays we want to keep. The picked array replaces the current one and the other is permanently discarded.    You want to assist Mike with discovering the aftereffects of q beauty tests.    Note that you test the attractiveness of the array a, so you start each beauty test with the primordial (initial) array a.…
Warning ⚠️ Don't post AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.

Chapter 7 Solutions

C++ How to Program (Early Objects Version)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
1.1 Arrays in Data Structure | Declaration, Initialization, Memory representation; Author: Jenny's lectures CS/IT NET&JRF;https://www.youtube.com/watch?v=AT14lCXuMKI;License: Standard YouTube License, CC-BY
Definition of Array; Author: Neso Academy;https://www.youtube.com/watch?v=55l-aZ7_F24;License: Standard Youtube License