Browse Source

added multiplication_repetition function

remotes/origin/multiplication
fdai7930 11 months ago
parent
commit
f73479c019
  1. 9
      src/multiplication.c
  2. 1
      src/multiplication.h

9
src/multiplication.c

@ -236,6 +236,15 @@ int karatsu_multi(int num1, int num2) {
}
int multiplication_repetition(int a, int n) {
int resultat = 0;
for (int i = 0; i < n; i++) {
resultat += a;
}
return resultat;
}

1
src/multiplication.h

@ -31,6 +31,7 @@ int bernoulli_multi(int num, int bernoulli);
float power_multi(float base, int exponent);
int bitwisee_multi(int num1, int num2);
int karatsu_multi(int num1, int num2);
int multiplication_repetition(int a, int n);

Loading…
Cancel
Save