diff --git a/src/multiplication.c b/src/multiplication.c index 4c1befe..133092c 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -91,7 +91,7 @@ int multi_using_logical_op(int num1, int num2) { return result; } -int multi_using_modulo(int num1, int num2, int modulo) { +int multi_modulo(int num1, int num2, int modulo) { return (num1 % modulo) * (num2 % modulo) % modulo; } diff --git a/src/multiplication.h b/src/multiplication.h index 7e1c2eb..1618293 100644 --- a/src/multiplication.h +++ b/src/multiplication.h @@ -14,7 +14,7 @@ int multi_using_two_comp(int num2, int num3); int multi_by_even(int num, int factor); int multi_using_lookup_table(int num1, int num2); int multi_using_logical_op(int num1, int num2); -int multi_using_modulo(int num1, int num2, int modulo); +int multi_modulo(int num1, int num2, int modulo); int multi_by_prime(int num, int prime); int multi_using_increment(int num1, int num2); int multi_by_prime_and_its_square(int num, int prime);