reading file data
Posted on 2004-10-02
I’m having problem with my text file. Not too sure on which function to use in this program.
My text file contains integer numbers and float. It has many lines and 1 line contain more than 20 numbers. There can be a mix of number type within that line.
Here is the pseudo code of it.
Open text file
Read number position 1-15 (regardless of the line)
For every 4th position
Read and compare it with a threshold value
If the 4th position < threshold value
Add 1 to sum
Print the total sum
I would really appreciate if anyone could guide me step by step in doing it.
Thanks in advance.