diff --git a/src/multiplication.c b/src/multiplication.c index 037d396..d5eff30 100644 --- a/src/multiplication.c +++ b/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); diff --git a/src/multiplication.h b/src/multiplication.h index a607f71..713e205 100644 --- a/src/multiplication.h +++ b/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);