天天看点

如何使用WinEDT输出do-while-loop问题

导入图片下的包,然后输入相应的命令即可解决

\documentclass{article}
\usepackage{algorithmicx}
\usepackage{algpseudocode}

\algdef{SE}[DOWHILE]{Do}{doWhile}{\algorithmicdo}[1]{\algorithmicwhile\ #1}%

\begin{document}
\begin{algorithmic}
  \Do
    \State Something
  \doWhile{$u \neq v$} % <--- use \doWhile for the "while" at the end
\end{algorithmic}
\end{document}