Help required! Bowling Assignment.
I am here to ask for some help with my assignment. I am taking a C programming course which has no relativity to my field of study, but had no choice than to take it. If i can get some help with my assignment which is due next wednsday would appreciate very much. :(
Write a program that reads a data file and uses an array to figure out bowling scores.
In bowling, 10 pins are set up for each frame and the player gets two chances to knock them down.
1. If the player knocks down less than 10 ten pins down with the two balls, his/her score for that frame is the total number of pins knocked down.
2. If the player knocks down all 10 pins with the two balls, it is called a spare and is marked with a "/"). The player gets 10 points plus the number of pins knocked down with the next ball.
3. If the player knocks down all 10 pins with one ball, it is called a strike and is marked with an "X"). The player gets 10 points plus the number of pins knocked down with the next two balls.
Frame 10 is a special case. If you get a strike on the first ball you get two extra balls to add-up their scores. If you get a spare with the first two balls then you get a third ball to throw. If you fail to knock down all pins with the first two balls, the game ends there.
Input data: The data file contains the player’s name and the number of pins knocked down with a ball. -1 indicates the end of the game (the next record is another player name).
Download the data file at http://www.scs.ryerson.ca/dhamelin/cps118/a/bowling.dat to test your program. Here is another one: bowling2.dat
For each player, print out the the traditional bowling sheet for that player.
Print out at the end the name of the winner and your personal and copyright information (see example).
The output report should be like the following example. This is for only one player; your report must include all players (skip 3 lines between players in the report).
Your report must use the data from the bowling.dat file but should work with any valid game file.
Program executed on: Actual date and time here*
Frame 1 2 3 4 5 6 7 8 9 10
J. Doe X 5/ 6-0 X 0-2 0-1 4-5 4/ 7/ XX9
Score 20 36 42 54 56 57 66 83 103 132
. . . other players scores here. . .
The winner is J. Doe
Program by: YOUR NAME HERE (STUDENT #) - SECTION 031
THIS PROGRAM IS MY OWN INDIVIDUAL WORK
How to submit:
You must submit the following for marking through Blackboard:
a) A listing of your C program (the .c file).
b) The output produced by the program using the bowling.dat file in txt format.
*See this program example to learn how to display the actual date/time in your program.
strcpy (now, ctime(&t));
printf ("%s", now);
Here is actual Link: