From b4148c534326f4d217c44ee39f44223820b850e4 Mon Sep 17 00:00:00 2001 From: Plebysnek <115377141+Plebysnacc@users.noreply.github.com> Date: Tue, 15 Apr 2025 23:05:36 +0200 Subject: [PATCH 1/2] change variable declaration to meet conventions --- files/arith4.cpp | 3 ++- files/debugger.cpp | 4 +++- files/if.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/files/arith4.cpp b/files/arith4.cpp index 857c9d5..b89910d 100644 --- a/files/arith4.cpp +++ b/files/arith4.cpp @@ -1,7 +1,8 @@ #include int main() { - int a, b; + int a; + int b; std::cout << "Gebe eine Zahl ein: "; std::cin >> a; diff --git a/files/debugger.cpp b/files/debugger.cpp index 618ca32..640de2d 100644 --- a/files/debugger.cpp +++ b/files/debugger.cpp @@ -1,7 +1,9 @@ #include int main() { - int a, b, c; + int a; + int b; + int c; std::cout << "Gebe eine Zahl ein: "; std::cin >> a; diff --git a/files/if.cpp b/files/if.cpp index c84e9aa..fa76a3b 100644 --- a/files/if.cpp +++ b/files/if.cpp @@ -1,7 +1,8 @@ #include int main() { - int a, b; + int a; + int b; std::cout << "Gebe eine Zahl ein: "; std::cin >> a; From 822f7714f72650b72fd38bbdca35cb2ae67089db Mon Sep 17 00:00:00 2001 From: Nicolas Schledorn Date: Tue, 20 May 2025 19:52:50 +0200 Subject: [PATCH 2/2] Apply suggestions from code review --- files/arith4.cpp | 4 ++-- files/debugger.cpp | 6 +++--- files/if.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/arith4.cpp b/files/arith4.cpp index b89910d..3658b1e 100644 --- a/files/arith4.cpp +++ b/files/arith4.cpp @@ -1,8 +1,8 @@ #include int main() { - int a; - int b; + int a{}; + int b{}; std::cout << "Gebe eine Zahl ein: "; std::cin >> a; diff --git a/files/debugger.cpp b/files/debugger.cpp index 640de2d..cb6bf5b 100644 --- a/files/debugger.cpp +++ b/files/debugger.cpp @@ -1,9 +1,9 @@ #include int main() { - int a; - int b; - int c; + int a{}; + int b{}; + int c{}; std::cout << "Gebe eine Zahl ein: "; std::cin >> a; diff --git a/files/if.cpp b/files/if.cpp index fa76a3b..455f6d9 100644 --- a/files/if.cpp +++ b/files/if.cpp @@ -1,8 +1,8 @@ #include int main() { - int a; - int b; + int a{}; + int b{}; std::cout << "Gebe eine Zahl ein: "; std::cin >> a;