"and" in algorithm

I could not find a \And command but we can make one:

\algnewcommand\And{\textbf{and}}

and add some space...

\documentclass{article}
\usepackage[noend]{algpseudocode}
\usepackage[nothing]{algorithm}
\algrenewcommand{\algorithmicrequire}{\textbf{Input:}}
\algrenewcommand{\algorithmicensure}{\textbf{Output:}}
\algnewcommand\And{\textbf{and} }

\begin{document}

\begin{figure}
\begin{algorithmic}
\If{$x> y$ \And  $ x<z$}
\State{some code here}
\EndIf
\end{algorithmic}
\end{figure}
\end{document}

Thanks: @Werner

Tags:

Algorithms