Question: Why wont this code match what this output should be ? It's only running the first line. Output: A single run of the program should

Why wont this code match what this output should be? It's only running the first line.
Output:
A single run of the program should resemble the following:
Enter the number of hits: 167
Enter the number of doubles: 32
Enter the number of triples: 4
Enter the number of home runs: 19
Singles: 112 Doubles: 32 Triples: 4 Home Runs: 19
Total Bases: 264
Or
Enter the number of hits: 121
Enter the number of doubles: 34
Enter the number of triples: 4
Enter the number of home runs: 25
Singles: 58 Doubles: 34 Triples: 4 Home Runs: 25
Total Bases: 238
Why wont this code match what this output should

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!