编辑代码

program Subroutines
	implicit none
	real*8 :: a, b, c, d
	a=3d0
	b=5d0
	call addIt(a,b)
	c=10d0
	d=2d0
	call addIt(c,d)
	
	contains
		subroutine addIt(a,b)
		implicit none
		real*8, intent(in) :: a,b
		real*8 :: c
		c=a+b
		write(*,*)a,'+',b,'=',c
	end subroutine
end program