I keep trying to fead this file into Fortran and output and format the data however I keep getting this message about The Runtime requesting to be terminated or something.
Real X
Real AVG, SUM, Y
open(3, File = 'C: test.txt')
open(5, File = 'C: test1.out')
SUM = 0.
Do 29, J = 1, 30
Read(3, 60) X
60 Format(2x, F4.2)
SUM = SUM + X
29 continue
AVG = Sum / 30
write(5, 65) AVG
65 Format(2x, 'Avg = ', F8.2)
* Read *, Y
Stop
End
Depending on your OS (meaning, compiler and your actual operating system) there are few things that can go wrong with that example.
For a start
is closer how that line is supposed to look like, although it is ususally best to just have the file in the same directory as the working program.