Write a c program that asks for the number of runs scored


Write a C++ program that asks for the number of runs scored in each inning of a little league baseball game. The game normally lasts 5 innings. If the home team is winning after the away team bats in the 5th inning, the game is over.


1 2 3 4 5 Total
Away 0 0 1 0 1 2
Home 0 2 0 1 0 3

Do not ask how many runs the home team scored in the 5th if the game is over. If the game is tied, both teams bat again. The program should print out a box score.


1 2 3 4 5 6 Total
Away 0 0 1 1 1 2 5
Home 0 2 0 1 0 1 4

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a c program that asks for the number of runs scored
Reference No:- TGS01481360

Now Priced at $10 (50% Discount)

Recommended (98%)

Rated (4.3/5)