diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2026-09-03 15:29:05 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2026-09-03 15:32:55 +0200 |
| commit | 822f9f2c6502da48dc3a4addcaa67295035def11 (patch) | |
| tree | a2fd53a9bc3091b8c9af50363a1b86463f3a85cb /Info/12 | |
| parent | 851f9fb846a5ba72d272d1d6646979c57e0813a8 (diff) | |
| download | unterricht-822f9f2c6502da48dc3a4addcaa67295035def11.tar.gz unterricht-822f9f2c6502da48dc3a4addcaa67295035def11.zip | |
move recursion into 12 grade directory
Diffstat (limited to 'Info/12')
| -rw-r--r-- | Info/12/1/.gitignore | 1 | ||||
| -rw-r--r-- | Info/12/1/Makefile | 15 | ||||
| -rw-r--r-- | Info/12/1/Rekursion.java | 13 | ||||
| l--------- | Info/12/Rekursion | 1 |
4 files changed, 30 insertions, 0 deletions
diff --git a/Info/12/1/.gitignore b/Info/12/1/.gitignore new file mode 100644 index 00000000..6b468b62 --- /dev/null +++ b/Info/12/1/.gitignore @@ -0,0 +1 @@ +*.class diff --git a/Info/12/1/Makefile b/Info/12/1/Makefile new file mode 100644 index 00000000..e8269b45 --- /dev/null +++ b/Info/12/1/Makefile @@ -0,0 +1,15 @@ +.PHONY: run all clean + +SRC := $(wildcard *.java) +OBJ := $(foreach src, $(SRC), $(subst .java,.class,$(src))) + +all: $(OBJ) + +run: all + @java Rekursion + +clean: + rm -f *.class + +%.class: %.java + javac $< diff --git a/Info/12/1/Rekursion.java b/Info/12/1/Rekursion.java new file mode 100644 index 00000000..cbc1d6b5 --- /dev/null +++ b/Info/12/1/Rekursion.java @@ -0,0 +1,13 @@ +class Rekursion { + public static void main(String argv[]) { + get(0); + } + + public static void get(int x) { + if (x == 6) + System.out.println("Code:"); + if (x < 6) + get(x+=2); + System.out.println(x); + } +} diff --git a/Info/12/Rekursion b/Info/12/Rekursion new file mode 120000 index 00000000..56a6051c --- /dev/null +++ b/Info/12/Rekursion @@ -0,0 +1 @@ +1
\ No newline at end of file |
