I am reading this post how \If{cond} \State{statement} \EndIf
can be placed in the same line. Could you please someone suggest a way on how \If{cond} \State{statement} \Else \State{statement} \EndIf
can be placed in the same line?
Algorithmic: Put If, Else and EndIf into the same line
algorithmic
Best Answer
Add
then input
will generate output
Full example, based on Werner's answer https://tex.stackexchange.com/a/184228