CIS170C-A5 B. Lab 5 of 7: Arrays and Strings solution

$19.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (2 votes)

Lab # CIS CIS170C-A5 B. Lab 5 of 7: Arrays and Strings C. Lab Overview

C++

Write a program to do the following:

In main, declare a PlayerName Array and a Score Array. Declare the size of the arrays to be 100.

In the InputData function, input the player name and score into the arrays for an unknown number of players up to 100.

In the DisplayPlayerData function, display the name and score of each player.

In the CalculateAverageScore function, calculate the average score and return it by value.

In the DisplayBelowAverage function, display the name and score for any player who scored below the average. Do not use global variables.

Output from Program:

Enter Player Name (Q to quit): Bob

Enter score for Bob: 3245

Enter Player Name (Q to quit): Sue

Enter score for Sue: 1098

Enter Player Name (Q to quit): Dave

Enter score for Dave: 8219

Enter Player Name (Q to quit): Pat

Enter score for Pat: 3217

Enter Player Name (Q to quit): Q

Name Score

Bob 3245

Sue 1098

Dave 8219

Pat 3217

Average Score: 3944.75

Players who scored below average

Name Score

Bob 3245

Sue 1098

Pat 3217

Press any key to continue . . .