
\documentclass{article}
\usepackage{algpseudocode}
\usepackage{algorithm}
\begin{document}
\begin{algorithm}
\caption{family}
\hspace*{\algorithmicindent} \textbf{Input}\\
\hspace*{\algorithmicindent} \textbf{Output}
\begin{algorithmic}[1]
\State sing
\While dark
\State radar
\If {not found}
\State does
\ElsIf {pick}
\State case \If do
\State did
\EndIf
\EndWhile
\end{algorithmic}
\end{algorithm}
\end{document}
Respuesta1
No cerró una de sus declaraciones If. Este código funciona:
\documentclass{article}
\usepackage{algpseudocode}
\usepackage{algorithm}
\begin{document}
\begin{algorithm}
\caption{family}
\hspace*{\algorithmicindent}
\textbf{Input}\
\hspace*{\algorithmicindent}
\textbf{Output}
\begin{algorithmic}[1]
\State sing
\While dark
\State radar
\If {not found}
\State does
\ElsIf {pick}
\State case
\If do
\State
did
\EndIf
\EndIf
\EndWhile
\end{algorithmic}
\end{algorithm}
\end{document}
Además, por favor vea¿Cómo hacer buenas preguntas?y formatee su código para una lectura más fácil. Espero poder ayudar.