Browse Source

refactoring: added descriptions for division cases

remotes/origin/develop
Eric Bagus 11 months ago
parent
commit
38e96b104d
  1. 4
      src/arithmeticDivision.c

4
src/arithmeticDivision.c

@ -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;
}

Loading…
Cancel
Save