From a8b6e1ea279dfa072dfecad469a119d1b2a5e43e Mon Sep 17 00:00:00 2001 From: cxnnqr Date: Tue, 6 Feb 2024 12:45:22 +0100 Subject: [PATCH] refactoring: refactored negative number handling into one line --- src/kgV/kgV.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/kgV/kgV.c b/src/kgV/kgV.c index e050d06..64983ee 100644 --- a/src/kgV/kgV.c +++ b/src/kgV/kgV.c @@ -4,7 +4,5 @@ int kgV(int a, int b){ if(a == 0 || b == 0) return 0; - int kgV = a*b/ ggT(a, b); - int absoluteKgV = abs(kgV); - return absoluteKgV; + return abs(a*b/ ggT(a, b)); } \ No newline at end of file