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.

20 lines
440 B

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