I added some pseudocode to my document in this style:
\usepackage{algpseudocode}
\begin{algorithmic}[1]
\If {$i\geq maxval$}
\State $i\gets 0$
\Else
\If {$i+k\leq maxval$}
\State $i\gets i+k$
\EndIf
\EndIf
\end{algorithmic}
I want my pseudocode to appear in a box, i.e. framed.
I tried
\framebox{
\begin{algorithmic}[1] ...
\end{algorithmic}
}
but that gave me tons of errors and didn't divide the code on multiple lines.
How can I frame my pseudocode?
