From 609cd5663c2b848e9c16f3eff6f96de65595ccd8 Mon Sep 17 00:00:00 2001 From: fdai7754 Date: Thu, 8 Feb 2024 21:09:31 +0100 Subject: [PATCH] refactoring: variablen zur besseren lesbarkeit umbenannt --- src/minirechner.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/minirechner.c b/src/minirechner.c index 680410b..fc6b532 100644 --- a/src/minirechner.c +++ b/src/minirechner.c @@ -95,22 +95,22 @@ float rest(float a, float b) { // groesster gemeinsammer Teiler float groesster_gemeinsammer_teiler(float a, float b) { - float gr, kl; + float gross, klein; float rest = 1; if (a > b) { - gr = a; - kl = b; + gross = a; + klein = b; } else { - gr = b; - kl = a; + gross = b; + klein = a; } while (rest != 0) { - rest = fmod(gr, kl); - gr = kl; - kl = rest; + rest = fmod(gross, klein); + gross = klein; + klein = rest; } - return gr; + return gross; } // kleinstes gemeinsammes Vielfaches