Browse Source

refactoring: replaced the multi_by_ten (a * 10) , with multi_by_five (a * 5)

remotes/origin/multiplication
fdai7930 11 months ago
parent
commit
73966f2e78
  1. 5
      src/multiplication.c
  2. 2
      src/multiplication.h

5
src/multiplication.c

@ -4,6 +4,7 @@
#include <math.h>
double multi( double ein1, double ein2) {
return (ein1 * ein2);
}
@ -22,8 +23,8 @@ int multi_left_shift(int a, int b) {
int multi_right_shift(int a, int b) {
return a >> b;
}
int multi_by_ten(int a) {
return a * 10;
int multi_by_five(int a) {
return a * 5;
}
float multi_by_percentage(float num, float percentage) {

2
src/multiplication.h

@ -5,7 +5,7 @@ double square(double x);
int multi_three_integers(int a, int b, int c);
int multi_left_shift(int a, int b);
int multi_right_shift(int a, int b);
int multi_by_ten(int a);
int multi_by_five(int a);
float multi_by_percentage(float num, float percentage);
int multi_by_random(int num);
int multi_string(const char* str, int factor);

Loading…
Cancel
Save