|
|
@ -4,6 +4,7 @@ |
|
|
|
#include <stdlib.h> |
|
|
|
|
|
|
|
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; |
|
|
|
} |
|
|
|