@ -169,12 +169,23 @@ int multiply_hex_numbers(int num1, int num2) {
if (num2 & 1) {
result += num1;
}
num1 <<= 4; // Décalage hexadécimal
num1 <<= 4;
num2 >>= 1;
return result;
int multiply_exponentiation(int base, int exponent) {
int result = 1;
while (exponent > 0) {
if (exponent & 1) {
result *= base;
base *= base;
exponent >>= 1;
@ -24,6 +24,7 @@ int multiply_using_differences(int num1, int num2);
int multiply_recursive_optimized(int num1, int num2);
int multiply_octal_numbers(int num1, int num2);
int multiply_hex_numbers(int num1, int num2);
int multiply_exponentiation(int base, int exponent);
#endif // MULTIPLICATION_H