@ -24,3 +24,15 @@ long* division_long(long dividend, long divisor) {
*result = dividend / divisor;
return result;
}
double* division_double(double num1, double num2) {
if(num2 == 0) {
return NULL;
double* result = malloc(sizeof(double ));
*result = num1 / num2;
@ -5,4 +5,6 @@ int* division_integer(int, int);
long* division_long(long, long);
double* division_double(double, double);
#endif //THEADMIRALS_ARITHMETICDIVISION_H