The example given below is what I want to do. But there are three extra lines.
Code: Select all
\documentclass{article}
\usepackage[noend]{algorithmic}
\usepackage{algorithm}
\begin{document}
\begin{algorithm}
\caption{Iterate} \label{alg:it}
\begin{algorithmic}
\STATE n = 1
\FOR { $i=1$ \TO $n$ }
\STATE $print(i)$
\ENDFOR
\end{algorithmic}
\end{algorithm}
\end{document}
Thanks