Question: cpp type Write a program to do the following: initialize two arrays of ints of size 9 9 named hits and atBats Prompt with Please

cpp type
Write a program to do the following:
initialize two arrays of ints of size 99 named hits and atBats
Prompt with "Please enter the number of players: "
Read in numberOfPlayers
Enter a for loop that populates the two arrays by:
In for - Prompt with "Please enter the number of hits for player (i+1):""
In for - Read into hits
In for - Prompt with "Please enter the number of \"at bats\" for player (i+1): "
In for - Read into atBats
end for
Output "
Player Number\tHits\tAt Bats
"
Enter a for loop that runs the length of the two arrays and prints out "(i+1)\t\thits[i]\tatBats[i]
Test before continuing to Part 2!
Create a new array of doubles named battingAverage of size 99
Enter a for loop that runs the length of the arrays and stores the player's batting average
Output "
Player Number\tHits\tAt Bats\tBatting Average\tBatting Average
"
Enter a for loop that runs the length of the arrays and and outputs the data indicated above in columns
Test before continuing to part 3!
Output "
Excellent Batters:
"
Output "Player Number\tHits\tAt Bats\tBatting Average
");
Output each of the players with an average higher than .300 only.
Enter a loop that runs the length of the arrays and prints out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!