Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To solve the following problem, you will use a two-dimensional array and two arrays of strings. A company has four salespeople (1 4) who sell

image text in transcribedimage text in transcribed

To solve the following problem, you will use a two-dimensional array and two arrays of strings. A company has four salespeople (1 4) who sell 5 different products (1 5). Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains: 1. The salesperson number 2. The product number 3. The total dollar value of that product sold that day 4. Before the slips are entered, the name of the salesperson (first and last name separated by a space) will be entered into an array of strings called names. The products will also be entered into an array of strings called products. The program will first prompt the user for the names of all of the salespersons (1 4) and then will prompt for all of the products (1 5) and store the names in the correct location in the array. Then in your program you will allow the slips to be entered for a month and totaled. If there is already a value entered for the salesperson, you will add the new slip information to the current information. You program will read all this information and summarize the total sales by salesperson by product. All totals should be stored in the double-scripted array sales. After processing all the information for the last month, print the results in tabular format with each of the columns representing a particular salesperson (print out their name) and each of the rows representing a particular product (print out the product names). Cross total each row to get the total sales of each product for the last month; cross total each column to get the total sales by salesperson for the 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.

BASIC C++ please! Thank You.

To solve the following problem, you will use a two-dimensional array and two arrays of strings A company has four salespeople (1 - 4) who sell 5 different products (1 - 5). Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains 1. The salesperson number 2. The product number 3. The total dollar value of that product sold that day 4 Before the slips are entered, the name of the salesperson (first and last name separated by a space) will be entered into an array of strings called names. The products will also be entered into an array of strings called products. The program will first prompt the user for the names of all of the salespersons (1- 4) and then will prompt for all of the products (1 - 5) and store the names in the correct location in the array Then in your program you will allow the slips to be entered for a month and totaled. If there is already a value entered for the salesperson, you will add the new slip information to the current information. You program will read all this information and summarize the total sales by salesperson by product. All totals should be stored in the double-scripted array sales After processing all the information for the last month, print the results in tabular format with each of the columns representing a particular salesperson (print out their name) and each of the rows representing a particular product (print out the product names). Cross total each rovw to get the total sales of each product for the last month, cross total each column to get the total sales by salesperson for the 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 Example input Enter salesperson #1 name Joe Blow Enter salesperson #2 name Henry Ford Enter salesperson #3 name John Chevy Enter salesperson #4 name Lacy Curtains Enter product #1 name Lavendar soap

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions

Question

What is the IRS mileage rate for use of a car for business in 2013?

Answered: 1 week ago

Question

Comment should this MNE have a global LGBT policy? Why/ why not?

Answered: 1 week ago