Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given a file with the results from a game of bowling, calculate the final score

ID: 3533058 • Letter: G

Question

Given a file with the results from a game of bowling, calculate the final score and report the results to an output file. I do not have to control bad input from file and all numbers will be legal to the game of bowling.

We have not learned arrays yet so I'm trying to do this program without them.


Text file it reads in looks like this:

10

7 3

7 2

9 1

10

10

10

2 3

6 4

7 3 3


Then the output to the screen and to an output file should look like this:


                1        2      3 4 5    6 7 8 9 10   

Player     X       7/    7 2 9/       X    X X      2 3    6/      7/3

Score     20 37 46      66    96    118 133 138   155 168

Explanation / Answer

Really appreciate it =D, you didn't have to. For being nice I completed it with ofstream also. File names are up to your choosing, thanks once again.

http://ideone.com/Ahvwhs

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote