function lock_test ( )

%*****************************************************************************80
%
%% lock_test() tests lock().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 October 2008
%
%  Author:
%
%    John Burkardt
%
  n = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'lock_test():\n' );
  fprintf ( 1, '  lock() counts the combinations on a button lock.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  I   LOCK(I)\n' );
  fprintf ( 1, '\n' );

  a = lock ( n );

  for i = 0 : n
    fprintf ( 1, '  %2d  %10d\n', i, a(i+1) );
  end

  return
end
