\begin{algorithm} \caption{FindMax} \begin{algorithmic} \FUNCTION{FindMax}{A, n} \STATE $max \gets A[0]$ \FOR{$i \gets 1$ \TO $n - 1$} \IF{$A[i] > max$} \STATE $max \gets A[i]$ \ENDIF \ENDFOR \RETURN $max$ \ENDFUNCTION \end{algorithmic} \end{algorithm}