From 60fc902f3ada26e6c83ea91a9c89c987d487ed49 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 5 Jul 2026 19:01:11 +0200 Subject: planet: add handouts containing solutions --- .../algorithmik/while/bedingte-wiederholung.md | 20 +++++++++++++++++++- .../algorithmik/while/sucheStein-flowchart.tikz | 10 ++++++---- .../algorithmik/while/sucheStein-struktogramm.tikz | 1 + 3 files changed, 26 insertions(+), 5 deletions(-) (limited to 'Info/9/3/Planet/algorithmik/while') diff --git a/Info/9/3/Planet/algorithmik/while/bedingte-wiederholung.md b/Info/9/3/Planet/algorithmik/while/bedingte-wiederholung.md index 6cc9026c..f142a63d 100644 --- a/Info/9/3/Planet/algorithmik/while/bedingte-wiederholung.md +++ b/Info/9/3/Planet/algorithmik/while/bedingte-wiederholung.md @@ -107,15 +107,33 @@ In Java kann das **kein** in "*kein Gestein*" durch ein Ausrufezeichen `!`{style ::::: {.column width=33%} **Programmcode:** -
+::::::{.solution} + +void sucheStein() {
+[while([!gesteinVorhanden()]{color="magenta"})]{style="margin-left: 20px;"}
+[{]{style="margin-left: 20px;"}
+[fahre();]{style="color: orange; margin-left: 40px;"}
+[}]{style="margin-left: 20px;"}
+[nimmGestein();]{style="margin-left: 20px;"}
+} +
+:::::: ::::: ::::: {.column width=33%} **Programmablauf:** + +::::::{.solution} +![](sucheStein-flowchart.svg) +:::::: ::::: ::::: {.column width=33%} **Struktogramm:** + +::::::{.solution} +![](sucheStein-struktogramm.svg) +:::::: ::::: :::: ::: diff --git a/Info/9/3/Planet/algorithmik/while/sucheStein-flowchart.tikz b/Info/9/3/Planet/algorithmik/while/sucheStein-flowchart.tikz index 393e85df..b46112fe 100644 --- a/Info/9/3/Planet/algorithmik/while/sucheStein-flowchart.tikz +++ b/Info/9/3/Planet/algorithmik/while/sucheStein-flowchart.tikz @@ -29,13 +29,15 @@ \begin{tikzpicture} \node (start) {}; \node[decision, below=of start] (decision1) {\textcolor{magenta}{Kein Gestein vorhanden}}; - \node[process, below=of decision1] (process2) {\textcolor{orange}{fahre()}}; + + \node[process, below=of decision1] (process) {\textcolor{orange}{fahre()}}; + \node[process, below=2cm of process] (process2) {nimmGestein()}; % Arrows \draw[arrow] (start) -- (decision1); - \draw[arrow] (decision1) -- node[right] {Wahr} (process2); + \draw[arrow] (decision1) -- node[right] {Wahr} (process); % Decision branch - \draw[arrow] (decision1) -- node[above] {Falsch} ($(decision1.east) + (1cm, 0)$) -- ($(decision1.east) + (1cm, -3cm)$); - \draw[arrow] (process2.west) -| (-3, -2.4) |- (decision1.west); + \draw[arrow] (decision1) -- node[above] {Falsch} ($(decision1.east) + (1cm, 0)$) -- ($(decision1.east) + (1cm, -4cm)$) -- ($(decision1) + (0, -4cm)$) -- (process2); + \draw[arrow] (process.west) -| (-3, -2.4) |- (decision1.west); \end{tikzpicture} diff --git a/Info/9/3/Planet/algorithmik/while/sucheStein-struktogramm.tikz b/Info/9/3/Planet/algorithmik/while/sucheStein-struktogramm.tikz index 1ca2403a..1f2c2f4c 100644 --- a/Info/9/3/Planet/algorithmik/while/sucheStein-struktogramm.tikz +++ b/Info/9/3/Planet/algorithmik/while/sucheStein-struktogramm.tikz @@ -2,4 +2,5 @@ \while{solange \textcolor{magenta}{kein Gestein vorhanden}} \assign{\textcolor{orange}{fahre()}} \whileend + \assign{nimmGestein()} \end{struktogramm} -- cgit v1.2.3