\usepackage[linesnumbered,ruled,vlined]{algorithm2e}\ \begin{algorithm}\ \SetKwInOut{Input}{Input}\ \SetKwInOut{Output}{Output}\ \Input{condition1, condition2}\ \Output{result}\ \If{condition1}{\ \hspace*{1em}statement1;\ }\ \ElseIf{condition2}{\ \hspace*{1em}statement2;\ }\ \Else{\ \hspace*{1em}statement3;\ }\ \caption{Conditional statement}\label{algo_conditional}\ \end{algorithm}

LaTeX Algorithm2e: 实现条件判断语句

原文地址: https://www.cveoy.top/t/topic/qhA9 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录