From 2d99d7bea9b0078c9d558635827683c61c4af2cf Mon Sep 17 00:00:00 2001 From: fdai7930 Date: Fri, 9 Feb 2024 10:58:44 +0100 Subject: [PATCH] refactoring: changed (prime - 1) to (prime - 2) in multi_by_prime fonction --- src/multiplication.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multiplication.c b/src/multiplication.c index 45f1fb7..4c1befe 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -96,7 +96,7 @@ int multi_using_modulo(int num1, int num2, int modulo) { } int multi_by_prime(int num, int prime) { - return num * (prime - 1) + num; + return num * (prime - 2) + num; } int multi_using_increment(int num1, int num2) {