\caption{Compute sum of integers in array}\label{array-sum}\begin{algorithmic}[1]\Procedure{ArraySum}{$A$} \State $sum = 0$ \For {each integer $i$ in $A$} \State $sum = sum + i$ \EndFor \State Return $sum$\EndProcedure\end{algorithmic}
\caption{Compute sum of integers in array}
ReplyDelete\label{array-sum}
\begin{algorithmic}[1]
\Procedure{ArraySum}{$A$}
\State $sum = 0$
\For {each integer $i$ in $A$}
\State $sum = sum + i$
\EndFor
\State Return $sum$
\EndProcedure
\end{algorithmic}