|
@ -14,4 +14,13 @@ int* division_integer(int dividend, int divisor) { |
|
|
int* result = malloc(sizeof(int)); |
|
|
int* result = malloc(sizeof(int)); |
|
|
*result = dividend / divisor; |
|
|
*result = dividend / divisor; |
|
|
return result; |
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
long* division_long(long num1, long num2) { |
|
|
|
|
|
if(num2 == 0) { |
|
|
|
|
|
return NULL; |
|
|
|
|
|
} |
|
|
|
|
|
long* result = malloc(sizeof(long)); |
|
|
|
|
|
*result = num1 / num2; |
|
|
|
|
|
return result; |
|
|
} |
|
|
} |