\usepackage{algorithm,algorithmic}
\begin{algorithm}
\caption{The Example Algorithm}
\label{alg123}
\begin{algorithmic}
\STATE{\textbf{Input:} ...}
\STATE{\textbf{Output:} ...}
\IF{...}
\STATE{...}
\ENDIF
\RETURN{...}
\end{algorithmic}
\end{algorithm}