You are the coach for the basketball team, and the season has just come to an end. You decide to write a program that will store the score in every game of the season. There are 5 games in the season, so you need to use a dynamic array for every game. With every upcoming game, your team got better in scoring points. For example, game 1 = 21 pts, game 2 = 32 pts, game 5 = 65 pts.
Then you receive an update that in one of the games, you received additional points. So you need to check the score for that game by asking for user input, adding the additional points to that game, then displaying the updated score for every game and calculating the total score for the season.
Functions explained:
- void alterGameScore(int a, int n) - adds k points (k being user input taken inside the function, not as a parameter) to game n
- int totalScore(int a, int length) - returns all added points in the dynamic array
- void printScores(int a, int length) - prints all updated points for all games
You are provided with some template code. You have to implement it (don't change the code) and add