Browse Source

Expanded arithmetic addition by double calculation

remotes/origin/develop
Eric Bagus 11 months ago
parent
commit
db69a56b09
  1. 6
      src/arithmeticAddition.c
  2. 2
      src/arithmeticAddition.h

6
src/arithmeticAddition.c

@ -11,3 +11,9 @@ int* addition_integer(int num1, int num2) {
*result = num1 + num2;
return result;
}
double* addition_double(double num1, double num2) {
double* result = malloc(sizeof(double));
*result = num1+num2;
return result;
}

2
src/arithmeticAddition.h

@ -3,4 +3,6 @@
int* addition_integer(int, int);
double* addition_double(double, double);
#endif //THEADMIRALS_ARITHMETICADDITION_H
Loading…
Cancel
Save