Mutliple inputs with line breaking

You can define a new command to give you the desired indentation:

\documentclass{article}
\usepackage{algorithm2e}

\newlength\mylen
\newcommand\myinput[1]{%
  \settowidth\mylen{\KwIn{}}%
  \setlength\hangindent{\mylen}%
  \hspace*{\mylen}#1\\}

\begin{document}

\begin{algorithm}
\KwIn{Input number 1}
\myinput{Input number 2}
\myinput{Input number 3 spanning more than one line just as an illustration for the example}
\end{algorithm}

\end{document}

enter image description here


\SetKwInOut{Input}{input}  
\Input{a\\
b\\
c  
}

works fine


I solved the problem by using \newline instead of \\. Here it is a working example:

\documentclass{article}
\usepackage[ruled,vlined,dotocloa]{algorithm2e}
\usepackage{listings}

\begin{document}
\begin{algorithm}[!h]
    \SetAlgoLined
    \small
    \DontPrintSemicolon
    \LinesNumbered

    \KwIn{Input 1\newline
            Input 2\newline
            Input 3}

    Some smart pseudocode line 1 \;
    Some smart pseudocode line 2 \;
    Some smart pseudocode line 3 \;

    \KwOut{ Output 1\newline
            Output 2}
    \caption{My Fabulous Algorithm}

\end{algorithm}
\end{document}