\documentclass[a4paper,11pt]{article}

\usepackage{ngerman}
%\usepackage[pdftex]{graphicx}

\usepackage{algorithm2e}

\usepackage{xcolor}
\usepackage{tabularx}
\usepackage{url}

\usepackage[latin1]{inputenc}

\usepackage{eurosym}
\usepackage{textcomp}
\usepackage[left=2.5 cm,right=2.5 cm,top=1.0cm,bottom=1.0cm]{geometry}
\pagestyle{empty}

\parindent0cm

\begin{document}

dies ist ein test\\


 \begin{algorithm}[H]
  \SetLine
  \KwData{this text}
  \KwResult{how to write algorithm with \LaTeX2e }
  initialization\;
  hier kann ich noch mehr zeilen einfügen\;
  \While{not at end of this document}{
    read current\;
    \eIf{understand}{
      go to next section\;
      current section becomes this one\;
      }{
      go back to the beginning of current section\;
      }
    }
  \caption{How to write algorithms}
\end{algorithm}


\end{document}
