|
|
@ -2,21 +2,21 @@ |
|
|
|
|
|
|
|
#include <stdlib.h> |
|
|
|
|
|
|
|
// arithmetic subtraction integer |
|
|
|
// arithmetic subtraction for integer |
|
|
|
int* subtraction_integer(int a, int b) { |
|
|
|
int* result= malloc(sizeof (int)); |
|
|
|
*result=a - b; |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
// arithmetic subtraction float |
|
|
|
// arithmetic subtraction for float |
|
|
|
float* subtraction_float(float a, float b) { |
|
|
|
float* result= malloc(sizeof (float)); |
|
|
|
*result=a - b; |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
// arithmetic subtraction double |
|
|
|
// arithmetic subtraction for double |
|
|
|
double* subtraction_double(double a, double b) { |
|
|
|
double* result= malloc(sizeof (double)); |
|
|
|
*result=a - b; |
|
|
|