@ -150,6 +150,18 @@ int multiply_recursive_optimized(int num1, int num2) {
return result;
}
int multiply_octal_numbers(int num1, int num2) {
int result = 0;
while (num2 != 0) {
if (num2 & 1) {
result += num1;
num1 <<= 3; // Décalage octal
num2 >>= 1;
@ -22,6 +22,7 @@ int multiply_by_odd(int num, int factor);
int multiply_using_binary_enumeration(int num1, int num2);
int multiply_using_differences(int num1, int num2);
int multiply_recursive_optimized(int num1, int num2);
int multiply_octal_numbers(int num1, int num2);
#endif // MULTIPLICATION_H