\newcounter{x}
\forloop{x}{0}{\value{x} < 5}{
value is \value{x} \\
}
如何从 for 循环内部打印 x 的值?
答案1
\documentclass[12pt]{article}
\usepackage{forloop}
\begin{document}
\newcounter{x}
\forloop{x}{0}{\value{x}<5}{\noindent value is \arabic{x}\\}
\end{document}