need help on arrays

Hello, so I've started learning C++ and came across this example on arrays. Can anyone explain how would I write the code? Thanks alot.

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.
Topic archived. No new replies allowed.