جوابی که فرمودید غلط بود، پاسخ صحیح سوال رو در اینترنت میذارم که دوستان استفاده کنند. ساختار if-else در الگوریتم باید به صورت زیر آورده شود:
\begin{algorithm}[H]
\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\caption{How to write algorithms}
\end{algorithm}
توسط
Masoumehj
(5 امتیاز)