Looks like you rearranged the wrong parts. You need to slow down. Don't just move a few lines around and hope it comes out right. You might as well put a hundred monkeys at the keyboard and hope they get it right. Programming is more about problem solving than typing. Can you solve this problem yourself with pencil and paper? If the answer is "no", then you sure as hell can't program it. Go through an example by hand, and pay careful attention to each little step you do, taking note of all the details. If you are totaling up the score for a golfer, do you start at 42 or 17? No, you start at 0. Do you write down the total score after every individual number you add? No, you write down the total score when you're all done. When you have mastered the process on paper and pencil, write some pseudo code. Pseudo code should have the same structure as real code, and the right logical flow to solve your problem, but you don't have to worry about syntax and other minutia. When the pseudo code is done, and you've "run it" in your head with some sample data, then you can turn it into real code. You should only write at most 5-10 lines at a time, then compile and test, and fix all errors and warnings before moving on (compile errors and runtime/logical errors).
Here's pseudo code to show what you did from line 43 on (the indentation shows you which loop the code belongs to):
Code:for each golfer you don't initialize score to zero here, so for the second through fourth golfer, you're not starting at zero, and your total score will be off for each hole that golfer played calculate the breakdown for that golfer on that hole add that breakdown to the total score for that golfer print the total score so far for that golfer -- you are doing this once per hole, not once per golfer close the file -- you are doing this once per golfer, you should be doing it after the loops are all done return 0; -- again, you are doing this once per golfer, you should be doing it after the loops are all done