Browse Source

refactoring: variablen zur besseren lesbarkeit umbenannt

remotes/origin/refactoring
fdai7754 12 months ago
parent
commit
609cd5663c
  1. 18
      src/minirechner.c

18
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

Loading…
Cancel
Save