need help writing a bowling program?

hey guys i have instructions on writing this bowling program but i dont know where to start.

Given a file with the results from a game of bowling, calculate the final score and report
the results to an output file and to the screen.
The data file will have the following structure:
10
7 3
7 2
9 1
10
10
10
2 3
6 4
7 3 3
Note that each line corresponds to a frame. Thus, the 10th
frame may have 3 rolls, if the
player throws a strike or a spare. This data would result in the following output:
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
You do not have to control for bad input. You may ignore anything beyond the 10th line of data.
~~ logic

Input:
Frame 1 - Throw 1:10 Throw 2:0 Throw 3:0
...

Store in array [a][b][c] // there are other ways
File: 1 10 0
2 9 1 ...

Control/function to calculate the score

Output to file and screen

> break the program into parts then codes it 1 by 1, it would be easier
Topic archived. No new replies allowed.