Question
A car dealership has 10 salespeople. The dealership keeps track of the number of cars sold by each salesperson each month and reports it to
A car dealership has 10 salespeople. The dealership keeps track of the number of cars sold by each salesperson each month and reports it to management. The management then takes that data and assigns a number 1 10 to each salesperson. The following statement declares an array to store the number of cars sold by each salesperson (it means that salesperson #1 sold 7 cars, salesperson #2 sold 3 cars etc):
int cars[10] = {7, 3, 6, 0, 14, 8, 1, 2, 9, 8};
Output
1) the total number of cars sold at the entire dealership,
2) which salesperson sold the most cars (Salesperson #1, Salesperson #2, etc.), and
3) how many cars that best salesperson sold.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started