Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Help The golf coach of a local high school team would like to hire you to write a program that calculates the average of

C++ Help

The golf coach of a local high school team would like to hire you to write a program that calculates the average of 5 students on the co-ed golf team after playing three rounds of golf. He would like the program to calculate the average for each student as well as the average for each round. The scores for each student in each round of golf are in the chart below. Also determine the best student average (in golf, the lower scores are better) recorded by the golfers.

a. Use main( ) as the driver function. Write functions to accomplish the following tasks:
1. Prompt and read the names of the 5 students and store them in a one-dimensional array of strings.
2. Prompt for the scores for each player in each round and store these values into a two-dimensional array.
3. Compute the average score for each student for the 3 rounds of golf and stores these values into a one-dimensional array.
4. Compute the average score for each round of golf and store these values into a one-dimensional array.
5. Determine the best student average recorded from the three rounds of golf. (Use the FindSmallest Function from a previous program). Display the information in a table format as shown below. Display all averages to a tenth of a decimal.

Player Round 1 Round 2 Round 3 Ave./Student

Mike Sims78 76 74 76.0

Paula Hill71 78 75 74.7

Steve Jones72 75 73 73.3

Jill Burton73 74 72 73.0

Lee Smith74 7978 77.0

Ave./Round 73.6 76.4 74.4

73.0 was the best recorded student average from the rounds of golf.

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions