View the step-by-step solution to:

Deitel's How to Program C 6.22 Use a double-subscripted array to solve the following problem. A company has four salespeople (1 to 4) who sell five...

Deitel's How to Program C

6.22 Use a double-subscripted array to solve the following problem. A company has four salespeople (1 to 4) who sell five different products (1 to 5). Each salesperson passes in slips for each different type of product sold. Each slip contains the following:

a) The salesperson number

b) The product number

c) 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 are available. I need to write a program that reads all this information for last month's sales 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 representing 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 salespersonfor 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.

Top Answer

Sample output: Enter The Sales Person Enter The Products with price. Example: 1 2 12 Enter -9 to exit the data entry and to... View the full answer

Output.png

Sign up to view the full answer

Other Answers

Let me explain the... View the full answer

5.jpg

:fli tl'ifi 5! Iififlfiflfiflflflfififilfiflfiflfiflfiifi Fiiifi‘ifiu um": a. uni-— .I" 55.11159 [LE3 fin-Iu‘tinr 'I fllfllfi «EMILE- ”i
l.
:5 F mun...

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online