- 积分
- 162
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-10-16
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2012-4-19 18:18:18
|
显示全部楼层
程序二
character(9) lat,lon,b,p
character(5) a,stid
character(11) c,n
integer year,mon,xun,d,e,f,ten,twenty,thirty,forty,fifty,seventy,hundred,g,h,i,j,k,l,m,v,o,q
open(2,file="tttt.txt")
open(3,file="end.txt")
do while(.not. eof(2))
q=0
read(2,10)a,b,p,d,e,f,g,h,i,j,k,l,m,n,o
open(1,file="2.txt")
do while(.not. eof(1))
read(1,10)stid,lat,lon,year,mon,xun,ten,twenty,thirty,forty,fifty,seventy,hundred,c,v
if (stid.eq.a.and.year.eq.d.and.mon.eq.e.and.xun.eq.f)then
write(3,10)stid,lat,lon,year,mon,xun,ten,twenty,thirty,forty,fifty,seventy,hundred,c,v
q=1
endif
enddo
close(1)
if(q.eq.0)then
write(3,10)a,b,p,d,e,f,g,h,i,j,k,l,m,n,o
endif
enddo
10 format(a5,2a9,i6,i4,i4,i9,6i7,a11,i8)
end |
|