diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-04-27 17:01:07 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-04-27 17:01:07 +0200 |
| commit | 45fd6810d6edac6539a5e74963245f20fbf8e2e0 (patch) | |
| tree | ee7b534d7d3045cf29bac66ff71087f9a9779590 /Info/9/3/Planet/algorithmik/if/if-else-flowchart.tikz | |
| parent | 6f9f18324234d62c16e657a003c905171092ca4d (diff) | |
| download | unterricht-45fd6810d6edac6539a5e74963245f20fbf8e2e0.tar.gz unterricht-45fd6810d6edac6539a5e74963245f20fbf8e2e0.zip | |
add if section for the planet
Diffstat (limited to 'Info/9/3/Planet/algorithmik/if/if-else-flowchart.tikz')
| -rw-r--r-- | Info/9/3/Planet/algorithmik/if/if-else-flowchart.tikz | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Info/9/3/Planet/algorithmik/if/if-else-flowchart.tikz b/Info/9/3/Planet/algorithmik/if/if-else-flowchart.tikz new file mode 100644 index 00000000..67317656 --- /dev/null +++ b/Info/9/3/Planet/algorithmik/if/if-else-flowchart.tikz @@ -0,0 +1,36 @@ +\tikzset{ + process/.style={ + rectangle, + minimum width=2.5cm, minimum height=1cm, + draw, + text centered + }, + % Decision (diamond) + decision/.style={ + diamond, aspect=2, + minimum width=2.5cm, minimum height=1cm, + draw, + text centered + }, + % Arrow style + arrow/.style={ + thick, ->, >=Stealth + } +} + +\begin{tikzpicture} + \node (start) {}; + \node[decision, below=of start] (decision) {\textbf{\textcolor{magenta}{Bedingung}}}; + \node[process, below=of decision] (process1) {\textbf{\textcolor{orange}{Anweisungen1}}}; + \node[process, right=of process1] (process2) {\textbf{\textcolor{orange}{Anweisungen2}}}; + \node[below=1.2cm of process1] (end) {}; + + % Arrows + \draw[arrow] (start) -- (decision); + \draw[arrow] (decision) -- node[right] {Wahr} (process1); + + % Decision branch + \draw[arrow] (process1) -- (end); + \draw[arrow] (decision) -- node[above] {Falsch} ($(decision.east) + (1cm, 0)$) -| (process2); + \draw[arrow] (process2.south) -- ($(process2.south) + (0, -0.4cm)$) |- ($(process1) - (0, 1.1cm)$); +\end{tikzpicture} |
