\begin{algorithm}
\caption{AlgorithmCH election algorithm}
\label{algorithm}
\begin{algorithmic}[1]
\Procedure{CHElection}
\For{each node i }
\EndFor
\EndProcedure
\end{algorithmic}
\end{algorithm}
Run Code Online (Sandbox Code Playgroud)
我有这段代码用于在 LATEX 中编写算法,但是! Missing number, treated as zero error当我指向该错误时,我收到了此错误 ( ),我在\Endfor 中看到了它。谁能告诉我为什么我会收到此错误?
这是我为编写算法添加的包
\usepackage[noend]{algpseudocode}
\usepackage[ruled,noresetcount,noend]{algorithm2e}
Run Code Online (Sandbox Code Playgroud)