I need to write a recursive algorithm, using the algorithms package.
I thought of writing something like this:
\begin{algorithmic}
\IF {$x=1}
\RETURN 1
\ELSE
\RETURN recurse$(x-1)$
\ENDIF
\end{algorithmic}
The problem here is that it's not obvious that the function "recurse" will call this very function (that is unnamed to start with) again. Is there a better way of doing it, besides stating in the text that "recurse" - well, recurses?
algorithmicpackage". Did you meanalgorithmicxoralgorithms(or maybe evenalgorithm2e)? – Hendrik Vogt Feb 22 '11 at 08:08