Hello,
This should be very easy for some people but I just cant get a grasp on it
The score is calculated by subtracting each user’s score from the par. For example, if the user needed 100 strokes to finish 18 holes, and the total par for the 18 holes is 90, their score is 10. Likewise, if the user only needed 80 and the total par was 90, their score is -10. In golf, lower numbers indicate better scores.
Up to 4 users can play a single game of golf. Their scores for each individual hole will be recorded in a file along with the par for each hole. This file will be the input for your scoring system. Your scoring system should calculate the final score for each of the players and output this value to the screen along with the player’s score breakdown.
1. The input will be in a file called input.txt
The first line of the file will contain a single positive integer, n (1 <= n <= 4), specifying the number of players.
The second line of the file will contain 18 positive integers that represent the par for each of the holes, from hole 1 to hole 18.
The following n lines will contain 18 positive integers, representing each user’s individual scores for each hole.
For each of the n players, output a line with the following format:
Player X scored Y.
Breakdown: A B C D E F G H I J K L M N O P Q R
X represents the player’s number: 1, 2, 3, or 4. Y represents their final score. Y may be negative.
The other letters represent the score for each hole. (A for hole 1, B for hole 2, etc.)
At the end, output which of the players in the winner in the following format:
Player X is the winner!
I have created a input.txt document that should store all of what I got into my document
2//Players
4 3 3 4 4 5 4 3 4 4 3 4 4 3 5 3 4 4
2 3 4 4 4 5 5 3 3 4 4 4 4 4 4 3 3 4
4 4 5 4 6 4 5 6 3 4 4 4 5 4 3 3 5 4