Bowling Score 1
Bowling
A game of bowling consists of 10 frames with two bowls (turns) per frame. The score for each frame is the combined score of the pins knocked down in each bowl. Create a program that will print the scores for each frame of a bowling game, and the total score at the end of the line. In this challenge, there are no strikes or spares.
Image from Wikipedia
Example
Here's an example game of 20 bowls (which are provided as one array):
0 3 3 6 0 5 4 4 9 0 8 1 7 2 8 1 7 0 9 0
For the output, just print the sum for each frame (of two bowls) and the total at the end, all on one line:
3 9 5 8 9 9 9 9 7 9 77
Note: Make sure to print each game's scores (space-separated) on its own line.
Challenge
Print the sum of each frame of a bowling game and the total score.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Comments
thales
Jul 19, 9:18 AMa solution ( dont forget to print the last on a new line!)
my code
Bolke
Jul 13, 7:52 PMmy code
Bolke
Jul 13, 7:54 PMI wonder why my code doesn't pass muster? I tried it in TextPad, and it worked fine. Here, it doesn't....
Learneroo
Jul 31, 4:12 PMSorry please make sure to print out the output for each game on its own line.
Bolke
Jul 31, 4:49 PMSorry in return; I think I already fixed it.