Originally Posted by
donaldunca
But I don't know how to read file "data.inp" line by line. I think I should use fgets, but seem that fgets is used for char.
Yes, use
fgets() to read the line, then you can use
sscanf() to convert the line into numbers.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes