You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
588 B

  1. #include "arithmeticSubtraction.h"
  2. #include <stdlib.h>
  3. //arithmetic Subtraction specification integer 1 function
  4. int* subtraction_integer(int a, int b) {
  5. int* result= malloc(sizeof (int));
  6. *result=a - b;
  7. return result;
  8. }
  9. //arithmetic Subtraction specification float
  10. float* subtraction_float(float a, float b) {
  11. float* result= malloc(sizeof (float));
  12. *result=a - b;
  13. return result;
  14. }
  15. //arithmetic Subtraction specification double
  16. double* subtraction_double(double a, double b) {
  17. double* result= malloc(sizeof (double));
  18. *result=a - b;
  19. return result;
  20. }