program diaocha1
implicit none
real a,b,c
open(unit=10,file='1218.txt',status='old',access='sequential',form='formatted')
read(10,100),a
close(10)
100 format(A,f7.4)
stop
open(unit=20,file='12182.txt',access='sequential',status='old',form='formatted')
read(20,100),b
close(20)
stop
open(unit=30,file='12183.txt',access='sequential',status='new',form='formatted')
c=a+b
write(30,100),c
close(30)
stop
end
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |