Reading Data from a File

Hello guys,

I was recently going about an assignment in which I had to read data from a file. Here is what the file contains:
_____________________________________________________________________
Starting Time of Call Rate per Minute
6.59 0.12
19.00 0.55
23.59 0.32

===================================================
Only the first 4 lines need to be read by your program.
The table above is interpreted as follows:
From 0.00 to 6.59, the rate is $0.12 per minute.
From 7.00 to 19.00, the rate is $0.55 per minute.
From 19.01 to 23.59, the rate is $0.32 per minute.
______________________________________________________________________

As you can see I am trying to make a program that calculates the cost of a telephone bill. I know how to read each word and letter one at a time but that would make my code unnecessarily long. How would I go about reading and storing these numbers into variables without having to read the words on the top of the file?
Topic archived. No new replies allowed.