这是我的代码:
\usepackage{algorithmic}
\begin{algorithm}
\caption{Calculate $A_{nxn}$}
\label{Algorithm 1}
\begin{algorithmic}
\开始{枚举} \项目... \结束{枚举}
\end{algorithmic}
\end{algorithm}
有什么问题 ?
答案1
您忘记上传algorithm
:
\documentclass{report}
\usepackage{algorithmic}
\usepackage{algorithm}
\begin{document}
See Algorithm \ref{algo-1}
\begin{algorithm}
\caption{Calculate $A_{nxn}$}\label{algo-1}
\begin{algorithmic}
\IF{$n<0$}
\STATE $x \leftarrow X$
\ENDIF
\end{algorithmic}
\end{algorithm}
\end{document}