summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/algorithm2e/doc/algorithm2e_exnlsty.tex
blob: 863adcbf5813b7ad1eb75a6f19cf71dff4eb4d7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
\SetNlSty{texttt}{[}{]}
\SetAlgoNlRelativeSize{0}
\SetNlSkip{0em}
\nl\KwIn{input data}
\nl\KwOut{output data}
\nl\tcc{a comment line in C-style}
\nl\Repeat{\nl$e<\tau$}{
  \nl$f_n\leftarrow Y_1$\;
  \nl$f_{n+1}\leftarrow f_n\times f_{n-1}$\;
  \nl$e\leftarrow \frac{f_n}{2}$\;
}
\nl\KwRet{$e$}