\documentclass[a4paper,10pt]{article}

\usepackage[utf8]{inputenc}
\usepackage{algorithm}
\usepackage{algorithmic}

\title{}
\author{}
\date{}

\pdfinfo{%
  /Title    ()
  /Author   ()
  /Creator  ()
  /Producer ()
  /Subject  ()
  /Keywords ()
}

\begin{document}
\maketitle

\begin{algorithm}
\caption{Algorithm x that does y.}
\textsc{quickSort(A,B)}
\begin{algorithmic}[1]
 \STATE text
 \IF{condition} \STATE{text} \ENDIF
 \FOR{condition} \STATE{text} \ENDFOR
 \FOR{condition \TO condition } \STATE{text} \ENDFOR
 \FORALL{condition} \STATE{text} \ENDFOR
 \WHILE{condition} \STATE{text} \ENDWHILE
 \REPEAT \STATE{text} \UNTIL{condition}
 \LOOP \STATE{text} \ENDLOOP
 \REQUIRE text
 \ENSURE text
 \RETURN text
 \PRINT text
 \COMMENT{text}
 \AND, \OR, \XOR, \NOT, \TO, \TRUE, \FALSE
\end{algorithmic}

\end{algorithm}


\algsetup{indent=1em}
\newcommand{\factorial}{\ensuremath{\mbox{\sc Factorial}}}
\begin{algorithm}[h!]
\caption{$\factorial(n)$}\label{alg:factorial}
\begin{algorithmic}[1]
\REQUIRE An integer $n \geq 0$.
\ENSURE The value of $n!$.
\medskip
\IF {$n = 0$}
\RETURN $1$
\ELSE
\RETURN $n \cdot \factorial(n-1)$
\ENDIF
\end{algorithmic}
\end{algorithm}


\end{document}
