From 24b707b24c6f00e86c8f865081606b89c6c35825 Mon Sep 17 00:00:00 2001 From: Justin Trausch Date: Wed, 7 Feb 2024 16:27:42 +0100 Subject: [PATCH] Division Double Struktur --- src/divsion.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/divsion.c b/src/divsion.c index 054eaf4..ab06fbf 100644 --- a/src/divsion.c +++ b/src/divsion.c @@ -10,7 +10,12 @@ int divisionInt(int a, int b) { } double divisionDouble(double a, double b) { - return 0; + if (b != 0) { + return a / b; + } + else { + return 0; + } } int divisionByTwo(int a, int b) {