Browse Source

refactoring: changed variables for long method similar to integer method

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

6
src/arithmeticDivision.c

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