[Fortran] 纯文本查看 复制代码 Program main
Implicit None
real::v,w,pd12,py12
integer::year1,year2,mon1,c1,c2
open(1,file='pd12.dat')
open(2,file='py12.dat')
open(3,file='canshu.dat')
do
read(2,*)year2,py12,c2
do
read(1,*)year1,mon1,pd12,c1
if((year1==year2).and.(pd12/=0.0))then
w=0.8363+181.77/pd12+244.55/py12
v=21.586*w**(-7.1891)
else if((year1==year2).and.(pd12==0.0))then
w=0.0
v=0.0
if (year1/=year2)exit
end if
write(3,'(1x,i5,i5,f10.1,f10.1)')year1,mon1,w,v
end do
end do
close(1)
close(2)
close(3)
end program |