From 6ad2f3dae75a26484f9066f427c8d108fdae202c Mon Sep 17 00:00:00 2001 From: cxnnqr Date: Fri, 2 Feb 2024 15:50:47 +0100 Subject: [PATCH] implemented case if at least one input is zero --- src/kgV/kgV.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kgV/kgV.c b/src/kgV/kgV.c index a9e61e8..2821d84 100644 --- a/src/kgV/kgV.c +++ b/src/kgV/kgV.c @@ -2,5 +2,6 @@ #include "ggT.h" int kgV(int a, int b){ + if(a == 0 || b == 0) return 0; return a*b/ ggT(a, b); } \ No newline at end of file