@ -32,4 +32,13 @@ double* division_double(double dividend, double divisor) {
double* result = malloc(sizeof(double ));
*result = dividend / divisor;
return result;
}
float* division_float(float dividend, float divisor) {
if(divisor == 0) {
return NULL;
float* result = malloc(sizeof(float));
@ -7,4 +7,6 @@ long* division_long(long, long);
double* division_double(double, double);
float* division_float(float, float);
#endif //THEADMIRALS_ARITHMETICDIVISION_H