Browse Source

refactoring: changed back to longer version for better overview and understanding

remotes/origin/kgV
cxnnqr 11 months ago
parent
commit
36035dbc00
  1. 7
      src/kgV/kgV.c

7
src/kgV/kgV.c

@ -8,5 +8,10 @@ int kgV(int a, int b){
if(a == 0 || b == 0) return 0; if(a == 0 || b == 0) return 0;
// Regular case of calculating the kgV // Regular case of calculating the kgV
return abs(a*b/ ggT(a, b));
int kgV = a*b/ ggT(a, b);
// Getting the absolute value of the kgV
int absoluteKgV = abs(kgV);
return absoluteKgV;
} }
Loading…
Cancel
Save