FutureMaleRN
2010-03-24 15:16:25 UTC
Process one team at a time. Prompt the user for the first team's scores by first asking for player one's score for game one, then game two, and then game three. Edit each bowling score, and do not continue the program until a valid value is entered. A bowling score can be between 0 and 300, inclusive. If an invalid score is entered, print an error message with the invalid score and request a valid score be entered. After player's one scores are correctly entered, calculate the series total by adding his/her games' scores. Calculate the player's game average (2 decimal precision) by dividing series by number of games. Then print that player's individual games' scores, his series, and his game average. Although three is generally recognized as the number of games in a bowling series, use a symbolic constant for number of games. For this program, assign the number three to the symbolic constant for number of games in a series. Code the program in a way that if the number of games ever changed in series, the only change to your program would be a change to the value of the symbolic constant.
1. first how would I set the boundries
2. How would I set up the constant for number of games?
like this: const double numberofgames = 3
or
like this: const int arr[3] = { }
After the first player's processing is complete, start processing the other players' scores on the team. For this program's purpose, use a symbolic constant for the number of players on a team and assign it a value of four. Again, if number of players per team ever changes, the only change to your program should be the value of your symbolic constant.
Again would i set the constant as an array or just a double
Use an array to store the bowling scores. You may need more than one array. You do not need to use a two dimensional array but you can if you want. You must have at least 1 function that accepts an array as an argument and updates the array in the function. You may have more than one function that accepts an array as an argument. Do not use any global variables. Symbolic constants may be used and these may be global.
How would I set up an array that takes numbers, stores them, and then prints them when prompted?
Also in the program one line of code I have reads this:
cout << "enter scores for team " << endl;
i need it to read team 1, team 2, team 3, etc....
how could I get it to keep counting.
I am not asking for you to do all my coding for my just maybe some examples or pointers to guide me in the right direction
btw, I forgot to mention before it is a program that tallys up bowling scores for an infinite number of teams until prompted to stop