|
|
@ -1,20 +1,22 @@ |
|
|
|
|
|
|
|
#include "arithmeticSubtraction.h" |
|
|
|
|
|
|
|
#include <stdlib.h> |
|
|
|
//arithmetic Subtraction specification integer |
|
|
|
|
|
|
|
// arithmetic subtraction integer |
|
|
|
int* subtraction_integer(int a, int b) { |
|
|
|
int* result= malloc(sizeof (int)); |
|
|
|
*result=a - b; |
|
|
|
return result; |
|
|
|
} |
|
|
|
//arithmetic Subtraction specification float |
|
|
|
|
|
|
|
// arithmetic subtraction float |
|
|
|
float* subtraction_float(float a, float b) { |
|
|
|
float* result= malloc(sizeof (float)); |
|
|
|
*result=a - b; |
|
|
|
return result; |
|
|
|
} |
|
|
|
//arithmetic Subtraction specification double |
|
|
|
|
|
|
|
// arithmetic subtraction double |
|
|
|
double* subtraction_double(double a, double b) { |
|
|
|
double* result= malloc(sizeof (double)); |
|
|
|
*result=a - b; |
|
|
|