From 17b1c0aca88b51bc62f6b2d3ed3b49219e10ad54 Mon Sep 17 00:00:00 2001 From: Arotex Date: Sat, 4 Oct 2025 09:23:08 +0200 Subject: [PATCH 1/3] 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/3] 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/3] =?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