Hi everyone!! I am Kevin, and I am new to this site. I am taking C++ classes and have trouble writing this program. I know I have to use several "for" loops and "rand" commands to write it but i am not exactly sure how to do that?? so, please can anyone help me with this? the question is:

Use a two dimensional array to solve the following problem. A company has four salesperson (1 to 4) who sell five different different products (1 to 5). Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains:
1) salesperson number.
2) the product number.
3) total dollar value of the product sold that day.

Each sales person passes between 0 to 5 sales slips perday. Assume that the information from all of the slips for last week is avaible. Write a program that will read all this information and summarize the total sales by salesperson by products. All totals should be stored in a two dimensional array sales. After processing all the information print the result in tabular format with each column representing a particular salesperson and each row representing a particular product. Cross total each row to get the total sales of each product and cross total each column to get the total sales by salesperson. your tabular printout should include these cross totals to the right of the totaled rows and bottom of the totaled columns.

>so, please can anyone help me with this?
Start by writing something, so we know you're actually engaging your brain and trying to learn rather than looking for freebies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.