function [ a1, a2 ] = r8vec_swap ( n, a1, a2 )

%*****************************************************************************80
%
%% r8vec_swap() swaps the entries of two R8VEC's.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 February 2005
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of entries in the arrays.
%
%    real A1(N), A2(N), the vectors to swap.
%
%  Output:
%
%    real A1(N), A2(N), the swapped vectors.
%
  a3(1:n) = a1(1:n);
  a1(1:n) = a2(1:n);
  a2(1:n) = a3(1:n);

  return
end
