aboutsummaryrefslogtreecommitdiff
path: root/Info/9/3/Planet/algorithmik/while
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-07-05 19:01:11 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-07-05 19:01:11 +0200
commit60fc902f3ada26e6c83ea91a9c89c987d487ed49 (patch)
tree599c58477e32828e4b9746033a5dd5f6905c6225 /Info/9/3/Planet/algorithmik/while
parentd833247d75e05becbd5e41fde118d3a6465f07b3 (diff)
downloadunterricht-60fc902f3ada26e6c83ea91a9c89c987d487ed49.tar.gz
unterricht-60fc902f3ada26e6c83ea91a9c89c987d487ed49.zip
planet: add handouts containing solutions
Diffstat (limited to 'Info/9/3/Planet/algorithmik/while')
-rw-r--r--Info/9/3/Planet/algorithmik/while/bedingte-wiederholung.md20
-rw-r--r--Info/9/3/Planet/algorithmik/while/sucheStein-flowchart.tikz10
-rw-r--r--Info/9/3/Planet/algorithmik/while/sucheStein-struktogramm.tikz1
3 files changed, 26 insertions, 5 deletions
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:**
-<div style="height: 10cm;"></div>
+::::::{.solution}
+<code style="white-space: pre;">
+void sucheStein() {<br>
+[while([!gesteinVorhanden()]{color="magenta"})]{style="margin-left: 20px;"}<br>
+[{]{style="margin-left: 20px;"}<br>
+[fahre();]{style="color: orange; margin-left: 40px;"}<br>
+[}]{style="margin-left: 20px;"}<br>
+[nimmGestein();]{style="margin-left: 20px;"}<br>
+}
+</code>
+::::::
:::::
::::: {.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}