View Single Post
  #1  
Old 03-09-2010, 12:41 AM
TheDon's Avatar
TheDon TheDon is offline
Ghost of Diesels Past
 
Join Date: Oct 2005
Posts: 13,285
need some help with C programming

again.. lol

So I need to use file I/O to take in some data and use it to output something...

taking in golf scores and the number of golfers.. example input

2 (number of golfers
1 2 3 4 5 x x x x x ( par)
2 3 4 4 4 (golfer 1 score)
3 4 4 2 1 (golfers 2 score)

number of golfers allowed for the program is golfers <=100.

I already did a program that takes in all that info and out puts the golfers over/under score.

so now I need to do the same thing but output it for each hole.

ex

Golfer 1 score : -1 0 1 2 -2 1 0 0
etc etc etc


so, I am thinking I can use a majority of the the code from the previous program but use arrays in some fashion to get the desired output but cannot think how to do it.

take note this is in C not C++
Reply With Quote