0
\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}
2

You did not close one of your If-Statements. This code works:

\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}

Also, please view How to ask good questions? and format your code for an easier read. Hope I could help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.