I follow http://shantoroy.com/latex/how-to-write-algorithm-in-latex/ and https://www.overleaf.com/read/rddymzwmnqgb
I have
\begin{algorithm}
\caption{Put your caption here}
\begin{algorithmic}[1]
\Procedure{Roy}{$a,b$} \Comment{This is a test}
\State System Initialization
\State Read the value
\If{$condition = True$}
\State Do this
\If{$Condition \geq 1$}
\State Do that
\ElsIf{$Condition \neq 5$}
\State Do another
\State Do that as well
\Else
\State Do otherwise
\EndIf
\EndIf
\While{$something \not= 0$} \Comment{put some comments here}
\State $var1 \leftarrow var2$ \Comment{another comment}
\State $var3 \leftarrow var4$
\EndWhile \label{roy's loop}
\EndProcedure
\end{algorithmic}
\end{algorithm}
Error
! Undefined control
sequence. \Procedure
How to fix it?
Best Answer
I am missing