module fun
    contains
    function add(a,b)
    integer a,b,add
    add=a+b
    return
    end function
end module


program main
    use fun
    implicit none
    integer::a=1
    integer::b=2
    write(*,*)"a+b=",add(a,b)
    end program