How do i work with infiles and outfiles

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anderson1373
    New Member
    • Nov 2009
    • 23

    How do i work with infiles and outfiles

    Here is my probleb but I dont know where to start. I kow how to create the txt file but i dont know how to read from it and output it. Iknow this is a homework assignment and i am not looking for the answer. I just need someone to help me get started.



    Write a program that will read an unknown number of bowlers and their bowling scores (with possible values from 1 to 300) from an external file called "bowlingscores. txt". The file will look similar to the following:
    David
    102
    Hector
    300
    Mary
    185
    Output the bowlers’ names to an external data file called "bowlingaverage s.txt".
    Next to each name with a score that is greater than the average score, output “above average!”
    For those below average, output “below average”
    For perfect scores (equal to 300), output “perfect!”
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    Try these links http://www.freenetpages.co.uk/hp/ala...d/tutfiles.htm,

    Comment

    • anderson1373
      New Member
      • Nov 2009
      • 23

      #3
      I got the file to open but not sure how to seperate it to average the score but still keep them together to print them out

      Comment

      Working...