I am writing an algorithm. I am already using the following packages for algorithms:
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{amsmath}
I am also using the \STATE
tag. I tried to add the package \usepackage{algpseudocode}
it started giving errors.
Best Answer
The
algorithmic
environment takes an optional argument. The optional argument is a number that defines the skip between line numbering. The default[0]
implies no line numbering, while[1]
puts a line number on every line.[2]
puts a line number every second line, and so forth: