Browse Source

refactoring: changed (prime - 1) to (prime - 2) in multi_by_prime fonction

remotes/origin/multiplication
fdai7930 11 months ago
parent
commit
2d99d7bea9
  1. 2
      src/multiplication.c

2
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) { 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) { int multi_using_increment(int num1, int num2) {

Loading…
Cancel
Save