主题:关于FORTRAN能读入的文件的格式
我想读入一些数据,这些数据是其他程序算出来的结果,是.txt文件,这个文件里没有任何的表头,直接就是数。有两排数,我想要第二排数,
0.0000000E+00 7.593943
0.0000000E+00 8.768681
0.0000000E+00 9.037177
0.0000000E+00 9.386056
0.0000000E+00 10.26630
0.0000000E+00 10.36240
0.0000000E+00 10.93504
0.0000000E+00 10.88161
0.0000000E+00 11.00410
0.0000000E+00 11.23001
0.0000000E+00 11.40522
0.0000000E+00 11.46054
0.0000000E+00 11.31875
0.0000000E+00 11.08517
0.0000000E+00 10.63244
0.0000000E+00 10.12399
0.0000000E+00 9.991618
0.0000000E+00 9.476178
0.0000000E+00 8.651938
0.0000000E+00 8.144175
0.0000000E+00 7.672819
0.0000000E+00 7.087220
0.0000000E+00 6.479482
0.0000000E+00 6.123188
0.0000000E+00 5.622539
0.0000000E+00 5.107646
0.0000000E+00 4.658457
0.0000000E+00 4.113833
0.0000000E+00 3.647985
0.0000000E+00 3.223560
0.0000000E+00 2.837384
0.0000000E+00 2.342051
0.0000000E+00 2.044287
0.0000000E+00 1.811534
0.0000000E+00 1.534816
0.0000000E+00 1.217895
0.0000000E+00 1.053390
0.0000000E+00 0.7960037
0.0000000E+00 0.7076768
0.0000000E+00 0.5852392
program canshu
implicit none
integer i,j
dimension e(100,2)
real e
open(10,file='nuclearloss.txt')
do 100 j=1,5
read(10,*)e(j,2)
100 continue
10 continue
do i=1,5
write(*,*) e(i,2)
end do
end
请各位赐教,我弄了一下午也没弄出来
总是给我输出一大堆零[em10]
0.0000000E+00 7.593943
0.0000000E+00 8.768681
0.0000000E+00 9.037177
0.0000000E+00 9.386056
0.0000000E+00 10.26630
0.0000000E+00 10.36240
0.0000000E+00 10.93504
0.0000000E+00 10.88161
0.0000000E+00 11.00410
0.0000000E+00 11.23001
0.0000000E+00 11.40522
0.0000000E+00 11.46054
0.0000000E+00 11.31875
0.0000000E+00 11.08517
0.0000000E+00 10.63244
0.0000000E+00 10.12399
0.0000000E+00 9.991618
0.0000000E+00 9.476178
0.0000000E+00 8.651938
0.0000000E+00 8.144175
0.0000000E+00 7.672819
0.0000000E+00 7.087220
0.0000000E+00 6.479482
0.0000000E+00 6.123188
0.0000000E+00 5.622539
0.0000000E+00 5.107646
0.0000000E+00 4.658457
0.0000000E+00 4.113833
0.0000000E+00 3.647985
0.0000000E+00 3.223560
0.0000000E+00 2.837384
0.0000000E+00 2.342051
0.0000000E+00 2.044287
0.0000000E+00 1.811534
0.0000000E+00 1.534816
0.0000000E+00 1.217895
0.0000000E+00 1.053390
0.0000000E+00 0.7960037
0.0000000E+00 0.7076768
0.0000000E+00 0.5852392
program canshu
implicit none
integer i,j
dimension e(100,2)
real e
open(10,file='nuclearloss.txt')
do 100 j=1,5
read(10,*)e(j,2)
100 continue
10 continue
do i=1,5
write(*,*) e(i,2)
end do
end
请各位赐教,我弄了一下午也没弄出来
总是给我输出一大堆零[em10]