program template_function 
   implicit none
   interface jafari
      integer function akbar_i(x)
      integer,intent(in)::x
      end function

      real function akbar_r(x)
      real,intent(in)::x
      end function
   end interface

   integer::i=5
   real::a=5.0
   print*,jafari(i)
   print*,jafari(a)
   
end program

integer function akbar_i(x)
   implicit none
   integer,intent(in)::x
   akbar_i=x+1
end function

real function akbar_r(x)
   implicit none
   real,intent(in)::x
   akbar_r=x+1.0
end function
