From 17b1c0aca88b51bc62f6b2d3ed3b49219e10ad54 Mon Sep 17 00:00:00 2001 From: Arotex Date: Sat, 4 Oct 2025 09:23:08 +0200 Subject: [PATCH 1/5] neue pring funktion erstellt --- main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.cpp b/main.cpp index b164a72..2f0e8f5 100644 --- a/main.cpp +++ b/main.cpp @@ -2,9 +2,19 @@ int number = 12; +void print_number (int); + main() { std::cout << "Hallo Welt" << std::endl << number << std::endl; std::cout << "experimentelle und evtl nicht fehlerfreier Code" << std::endl; + + print_number(20); // neue Funktion unsicher und unvollständig +} + + + +void print_number(int x){ + std::cout << x << std::endl; } \ No newline at end of file From 0f831b61388093bc572f0e36dca179f344702506 Mon Sep 17 00:00:00 2001 From: Arotex Date: Sat, 4 Oct 2025 09:25:29 +0200 Subject: [PATCH 2/5] pinrtfunktio erweitert --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 2f0e8f5..99ac7e9 100644 --- a/main.cpp +++ b/main.cpp @@ -16,5 +16,5 @@ main() void print_number(int x){ - std::cout << x << std::endl; + std::cout << "Die Zahl ist:" << x << std::endl; } \ No newline at end of file From c4921087190fdfe149a8d732db01ce8d7c368d7e Mon Sep 17 00:00:00 2001 From: Arotex Date: Sat, 4 Oct 2025 09:33:31 +0200 Subject: [PATCH 3/5] =?UTF-8?q?multipilikation=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 99ac7e9..6c58c6c 100644 --- a/main.cpp +++ b/main.cpp @@ -16,5 +16,6 @@ main() void print_number(int x){ - std::cout << "Die Zahl ist:" << x << std::endl; + std::cout << "Die Zahl ist: " << x << std::endl; + std::cout << "Das doppelte der Zahl ist: " << x*2 << std::endl; } \ No newline at end of file From 730c3c2e39ced57b7301ff02e2b02e031d796614 Mon Sep 17 00:00:00 2001 From: Arotex Date: Sat, 4 Oct 2025 09:39:18 +0200 Subject: [PATCH 4/5] =?UTF-8?q?neue=20Printfunktion=20mit=20multiplikation?= =?UTF-8?q?=20in=20INT=20=C3=BCbernommen=20und=20getestet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 6c58c6c..883b5ce 100644 --- a/main.cpp +++ b/main.cpp @@ -10,12 +10,19 @@ main() std::cout << "experimentelle und evtl nicht fehlerfreier Code" << std::endl; - print_number(20); // neue Funktion unsicher und unvollständig -} + //Funktionstest + + for (int i = 0; i < 50; i++) + { + print_number(i); // neue Funktion unsicher und unvollständig + } + +}; -void print_number(int x){ +void print_number(int x) +{ std::cout << "Die Zahl ist: " << x << std::endl; std::cout << "Das doppelte der Zahl ist: " << x*2 << std::endl; } \ No newline at end of file From cd08f8b08ed12cbd6bd45236ce4f4b84746bbdf3 Mon Sep 17 00:00:00 2001 From: Arotex Date: Sat, 4 Oct 2025 09:41:02 +0200 Subject: [PATCH 5/5] test2 --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 883b5ce..f75be92 100644 --- a/main.cpp +++ b/main.cpp @@ -12,7 +12,7 @@ main() //Funktionstest - for (int i = 0; i < 50; i++) + for (int i = 50; i < 60; i++) { print_number(i); // neue Funktion unsicher und unvollständig }