From 28b57122657fb573fe5f9e11e85fb6a3f3d67678 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 29 Sep 2026 18:11:12 +0200 Subject: move recursion material --- Info/12/Rekursion | 1 - Info/12/Rekursion/.gitignore | 1 + Info/12/Rekursion/Makefile | 15 +++++++++++++++ Info/12/Rekursion/Rekursion.java | 13 +++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) delete mode 120000 Info/12/Rekursion create mode 100644 Info/12/Rekursion/.gitignore create mode 100644 Info/12/Rekursion/Makefile create mode 100644 Info/12/Rekursion/Rekursion.java (limited to 'Info/12/Rekursion') diff --git a/Info/12/Rekursion b/Info/12/Rekursion deleted file mode 120000 index 56a6051c..00000000 --- a/Info/12/Rekursion +++ /dev/null @@ -1 +0,0 @@ -1 \ No newline at end of file diff --git a/Info/12/Rekursion/.gitignore b/Info/12/Rekursion/.gitignore new file mode 100644 index 00000000..6b468b62 --- /dev/null +++ b/Info/12/Rekursion/.gitignore @@ -0,0 +1 @@ +*.class diff --git a/Info/12/Rekursion/Makefile b/Info/12/Rekursion/Makefile new file mode 100644 index 00000000..e8269b45 --- /dev/null +++ b/Info/12/Rekursion/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/Rekursion/Rekursion.java b/Info/12/Rekursion/Rekursion.java new file mode 100644 index 00000000..cbc1d6b5 --- /dev/null +++ b/Info/12/Rekursion/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); + } +} -- cgit v1.2.3