@ -100,6 +100,13 @@ int multiply_by_prime(int num, int prime) {
return num * (prime - 1) + num;
}
int multiply_using_increment(int num1, int num2) {
int result = 0;
for (int i = 0; i < num2; ++i) {
result += num1;
return result;
@ -16,6 +16,7 @@ int multiply_using_lookup_table(int num1, int num2);
int multiply_using_logical_operations(int num1, int num2);
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);
#endif // MULTIPLICATION_H