diff --git a/src/arithmeticDivision.c b/src/arithmeticDivision.c index 4bb8a58..c29e7dd 100644 --- a/src/arithmeticDivision.c +++ b/src/arithmeticDivision.c @@ -4,6 +4,7 @@ #include int* division_integer(int dividend, int divisor) { + // division with 0 would cause errors if(divisor == 0) { return NULL; } @@ -17,6 +18,7 @@ int* division_integer(int dividend, int divisor) { } long* division_long(long dividend, long divisor) { + // division with 0 would cause errors if(divisor == 0) { return NULL; } @@ -26,6 +28,7 @@ long* division_long(long dividend, long divisor) { } double* division_double(double dividend, double divisor) { + // division with 0 would cause errors if(divisor == 0) { return NULL; } @@ -35,6 +38,7 @@ double* division_double(double dividend, double divisor) { } float* division_float(float dividend, float divisor) { + // division with 0 would cause errors if(divisor == 0) { return NULL; }