program call_subroutine_with_args
  implicit none
  integer :: a, b

  a = 5
  b = 10
  call add_and_print(a, b)

contains

  subroutine add_and_print(x, y)
    integer, intent(in) :: x, y
    print *, "Sum is:", x + y
  end subroutine add_and_print

end program call_subroutine_with_args
