From 822f9f2c6502da48dc3a4addcaa67295035def11 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 3 Sep 2026 15:29:05 +0200 Subject: move recursion into 12 grade directory --- Info/12/1/.gitignore | 1 + Info/12/1/Makefile | 15 +++++++++++++++ Info/12/1/Rekursion.java | 13 +++++++++++++ Info/12/Rekursion | 1 + 4 files changed, 30 insertions(+) create mode 100644 Info/12/1/.gitignore create mode 100644 Info/12/1/Makefile create mode 100644 Info/12/1/Rekursion.java create mode 120000 Info/12/Rekursion (limited to 'Info/12') 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 -- cgit v1.2.3