![Dieser algorithmische Befehl wird nicht ausgeführt](https://rvso.com/image/399818/Dieser%20algorithmische%20Befehl%20wird%20nicht%20ausgef%C3%BChrt.png)
\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}
Antwort1
Sie haben eine Ihrer If-Anweisungen nicht geschlossen. Dieser Code funktioniert:
\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}
Bitte sehen Sie sich auch anWie stellt man gute Fragen?und formatieren Sie Ihren Code, damit er leichter zu lesen ist. Ich hoffe, ich konnte helfen.