Browse Source

refactoring: added comments

remotes/origin/kgV
cxnnqr 11 months ago
parent
commit
5cf4056435
  1. 4
      src/kgV/kgV.c

4
src/kgV/kgV.c

@ -3,6 +3,10 @@
#include "ggT.h" #include "ggT.h"
int kgV(int a, int b){ int kgV(int a, int b){
// Case for at least one number is Zero
if(a == 0 || b == 0) return 0; if(a == 0 || b == 0) return 0;
// Regular case of calculating the kgV
return abs(a*b/ ggT(a, b)); return abs(a*b/ ggT(a, b));
} }
Loading…
Cancel
Save