Browse Source

refactoring: changed double division variables and removed spaces

remotes/origin/develop
Eric Bagus 11 months ago
parent
commit
b17b37d57b
  1. 9
      src/arithmeticDivision.c

9
src/arithmeticDivision.c

@ -25,14 +25,11 @@ long* division_long(long dividend, long divisor) {
return result;
}
double* division_double(double num1, double num2) {
if(num2 == 0) {
double* division_double(double dividend, double divisor) {
if(divisor == 0) {
return NULL;
}
double* result = malloc(sizeof(double ));
*result = num1 / num2;
*result = dividend / divisor;
return result;
}
Loading…
Cancel
Save