Browse Source

multiplication by sum

remotes/origin/multiplication
fdai7930 11 months ago
parent
commit
8cc602428e
  1. 4
      src/multiplication.c
  2. 1
      src/multiplication.h

4
src/multiplication.c

@ -44,5 +44,9 @@ int multiply_string(const char* str, int factor) {
return result; return result;
} }
int multiply_by_sum(int num1, int num2) {
return num1 * (num2 + 1);
}

1
src/multiplication.h

@ -9,6 +9,7 @@ int multiply_by_ten(int a);
float multiply_by_percentage(float num, float percentage); float multiply_by_percentage(float num, float percentage);
int multiply_by_random(int num); int multiply_by_random(int num);
int multiply_string(const char* str, int factor); int multiply_string(const char* str, int factor);
int multiply_by_sum(int num1, int num2);
#endif // MULTIPLICATION_H #endif // MULTIPLICATION_H

Loading…
Cancel
Save