function s = r8vec_running_sum ( n, v )

%*****************************************************************************80
%
%% r8vec_running_sum() computes the running sum of an R8VEC.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 February 2016
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of items.
%
%    real V(N), the data.
%
%  Output:
%
%    real S(N+1), the running sum.  S(I) is the sum
%    of the first I-1 values in V.
%
  s = zeros ( n + 1, 1 );
%
%  Sum.
%
  for i = 2 : n + 1
    s(i) = s(i-1) + v(i-1);
  end

  return
end
