diff --git a/src/multiplication.c b/src/multiplication.c index 24be7fd..b583823 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -44,5 +44,9 @@ int multiply_string(const char* str, int factor) { return result; } +int multiply_by_sum(int num1, int num2) { + return num1 * (num2 + 1); +} + diff --git a/src/multiplication.h b/src/multiplication.h index 1e6fddf..77be6d8 100644 --- a/src/multiplication.h +++ b/src/multiplication.h @@ -9,6 +9,7 @@ int multiply_by_ten(int a); float multiply_by_percentage(float num, float percentage); int multiply_by_random(int num); int multiply_string(const char* str, int factor); +int multiply_by_sum(int num1, int num2); #endif // MULTIPLICATION_H