Hints and Tips
There are a number of things you should keep in mind:
- Remember that when you read from a file, you always get a
string.
- Because it's a string, it will have the \n at the end, and you
have to get rid of that.
- Since the data has to be manipulated mathematically, you will
need to convert it to a number.
- The data is financial, so it involves dollars and cents.
- You will be computing an average, so make sure that you compute
something for the numerator and something for the denominator.
- Remember to close the file when you are done with it.