[Fortran] 纯文本查看 复制代码 program main
implicit none
character*5 filename
character*4 filename1
integer :: i,k,j,q
integer :: a(6)
do q = 1961, 2013
open(10, file = "D:\a\year.txt")
do i = 1, 53
read(10, *) filename1
open(11, file = "D:\c\"//filename1//".txt")
open(12, file = "D:\a\tem.txt")
do j = 1, 525
read(12, *) filename
open(13, file = "D:\a\"//filename//".txt")
do k = 1, 53
read (13, *) a(1:6)
if (a(5) == q) then
write(11,*) a(1:6)
exit
end if
end do
end do
close(13)
close(12)
end do
close(11)
close(10)
end do
end
我这样写代码,然后就是不停的写,然后被替换,到最后只留下2013年的数据,这的哪里需要改一下呢? |