I'm trying to write a pseudo code with Latex in my paper where I need to put a IF condition which has multiple conditions. I'm trying this but doesnt seem to work as the \Or command is not recognized:
\begin{algorithmic}
\While{$condition$}
\State $do-something$
\If {$condition-1$ \Or $condition-2$ \Or $condition-3$}
\State $break$
\EndIf
\EndWhile
\end{algorithmic}
I'm using the algpseudocode package. Also I need to put a "space" within the conditions, but latex just discards it and connects the two words together, any way to do this?
Cheers,
Nevermind guys, found out. This is the correct way
\begin{algorithmic}
\While{$condition$}
\State $do-something$
\If {$condition$ $1$ OR $condition$ $2$ OR $condition$ $3$}
\State $break$
\EndIf
\EndWhile
\end{algorithmic}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With