From 1ad792bd014afd7cb5c3451a1a83b52cd25aba10 Mon Sep 17 00:00:00 2001 From: fdai7968 Date: Thu, 8 Feb 2024 15:42:42 +0000 Subject: [PATCH] Update src/division/division.c --- src/division/division.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/division/division.c b/src/division/division.c index 8b13789..ee1e7cf 100644 --- a/src/division/division.c +++ b/src/division/division.c @@ -1 +1,8 @@ +#include "division.h" +float divide(float dividend, float divisor) { + if (divisor == 0) { + return 0; // Fehlerbehandlung: Division durch Null ist nicht definiert, daher geben wir einfach 0 zurück. + } + return dividend / divisor; +}