Hello,
This should be very simple but i just can't get it.
I am working on a program dealing with file input/output. The program should basically read golf scores from a golf.txt document that exist, and add up each players score and output a sum.
I have created a golf.txt document that is suppose store all the data for my program to read from.
the golf.txt file looks something like this:
2 // This is number of golf players
4 4 3 5 4 3 4 5 6 5 4 4 4 5 5 4 3 3 //This is player#1 score for the game
4 4 3 6 7 4 4 5 4 5 3 5 3 5 7 5 3 2 // This is player#2 score the game.
NOTE: The only part where I get stuck, during this program is coming up with the code to add up each row of integers from the golf.txt document individually and output a sum in my program.
-I have attached my program, so far, to this thread.
Any help and advice will be greatly appreciated.
Thank You,
Matt H.



LinkBack URL
About LinkBacks



