My question is similar to this one, I need to skip number for some lines of the algorithm. However the solution from that question does not work for me.
How can I disable numbers for some lines using the algorithmic package?
This is what I have tried:
\documentclass{article}
\usepackage{algorithmic}
\usepackage{algorithm}
\def\NoNumber#1{{\def\alglinenumber##1{}\State #1}\addtocounter{ALG@line}{-1}}
\begin{document}
\begin{algorithmic}[1]
\STATE Compute $Pr(X_i < x)$ and $Pr(x < X_i)$ for all $i = 1, \dots, M$ and
\FOR {$i = 1, \dots, n$}
\STATE with a number
\NoNumber{ without number}
\ENDFOR
\end{algorithmic}
\end{document}


algorithmicnumbers lines makes it very difficult to leave off a line. – egreg Apr 07 '13 at 23:28