Write a program that asks the user to enter the names of three salesmen. The pro
ID: 3535454 • Letter: W
Question
Write a program that asks the user to enter the names of three salesmen. The program shouldÂ
then accept the sales produced for each quarter of the year. Display the name, and the total salesÂ
amount, of each salesman.Â
Hint: Consider using two arrays in parallel. One array holds the name of the salesman (stringÂ
data type) and the other array holds the sales numbers (double data type). Since the data forÂ
each salesman is of different data types, you cannot use one array to hold all of the data. (AnÂ
array is a collection of identical data types.) Arrays are considered to be parallel if one of theÂ
subscripts in each array references the same thought (e.g. name[1] holds the name for the secondÂ
salesman and the sales data for the second salesman would be in sales[1]†¦ ).
Hint: It is possible to solve this problem using a two dimensional array to hold the sales data withÂ
one dimension referring to quarter and the other dimension referring to the sales amount for theÂ
quarter. See if you can solve the problem, by calculating the total sales for each salesman as theÂ
data is entered and storing only the names of the salesman and the total sales for each salesman.
Consider whether this problem could actually be solved without arrays. (Exercise 1 yes, but youÂ
will need your two dimensional array for Exercise 2 below).
( SEPERATE PROGRAM)
Extend the previous lab  such  that the name, and the corresponding sales amount, of the salesmanÂ
who sold the highest sales are displayed for each quarter.
Explanation / Answer
No answer text found in this record.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.