program test
  implicit none
  integer::a=1,b=2,c=3
  write(*,*) Add(a)
  c=4
  write(*,*) Add(a)
  write(*,*) Mul(b,c)

contains
  integer function Add(q)
    implicit none
    integer,intent(in)::q
    Add=q+c
  end function Add

  integer function Mul(x,y)
    implicit none
    integer,intent(in)::x,y
    mul=x*y
  end function Mul
end program test
