Question: Write a C program that prints a player's batting average (AVG) to the screen given the player's number of at bats (AB) and the player's

 Write a C program that prints a player's batting average (AVG)

Write a C program that prints a player's batting average (AVG) to the screen given the player's number of at bats (AB) and the player's number of hits (H). Your program should accept 2 integers from the user then calculate and display the player's batting average. Batting Average: AVG = H/AB Example: Miguel Cabrera currently has 476 at bats and 170 hits. His average should be calculated as 0.357143 Example of program execution: How many at bats? 476 How many hits? 170 Your player has batting average of 0.357143

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 Databases Questions!