%Copyright (C) 2012-2018 Jan Christian Rohde
%
%This file is part of MACE.
%
%MACE is free software; you can redistribute it and/or modify it under the terms of the
%GNU General Public License as published by the Free Software Foundation; either version 3
%of the License, or (at your option) any later version.
%
%MACE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
%even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%GNU General Public License for more details.
%
%You should have received a copy of the GNU General Public License
%along with MACE; if not, see http://www.gnu.org/licenses.
%This scripts calls another script, which provides an example for recursion.
%For a positive integer n the number of steps is counted till 1 is reached
%by the following recursive procedure:
%if n = 1, terminate
%else if n is odd, replace n by 3*n+1
%else if n is even, replace n by n/2
%repeat...
setCharacteristic(0)
input(n)
execute(exampleScripts/recursion/recursiveRoutine.txt,n)->(stepNumber)
stepNumber: