By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,097 Members | 1,580 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,097 IT Pros & Developers. It's quick & easy.

How do i work with infiles and outfiles

P: 23
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:
Output the bowlers’ names to an external data file called "bowlingaverages.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!”
Nov 16 '10 #1
Share this Question
Share on Google+
2 Replies

P: 23
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
Nov 17 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.