Browse Source

Refactoring: removed multiplication by five function (a*5)

remotes/origin/multiplication
fdai7930 11 months ago
parent
commit
672378fabe
  1. 4
      src/multiplication.c
  2. 2
      src/multiplication.h

4
src/multiplication.c

@ -21,9 +21,7 @@ int multi_left_shift(int a, int b) {
int multi_right_shift(int a, int b) {
return a >> b;
}
int multi_by_five(int a) {
return a * 5;
}
float multi_by_percentage(float num, float percentage) {
return num * (percentage / 100);

2
src/multiplication.h

@ -5,7 +5,7 @@ extern double multi(double num1, double num2);
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_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