@ -112,5 +112,14 @@ int multiply_by_prime_and_its_square(int num, int prime) {
return num * (prime + square (prime));
}
int multiply_by_odd(int num, int factor) {
int result = 0;
for (int i = 0; i < factor; ++i) {
result += num;
return result;
@ -18,6 +18,7 @@ int multiply_using_modulo(int num1, int num2, int modulo);
int multiply_by_prime(int num, int prime);
int multiply_using_increment(int num1, int num2);
int multiply_by_prime_and_its_square(int num, int prime);
int multiply_by_odd(int num, int factor);
#endif // MULTIPLICATION_H