導入圖片下的包,然後輸入相應的命令即可解決
\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}