@ -28,6 +28,11 @@ float multiply_by_percentage(float num, float percentage) {
return num * (percentage / 100);
}
int multiply_by_random(int num) {
int random_factor = rand() % 10 + 1;
return num * random_factor;
@ -7,5 +7,7 @@ int multiply_left_shift(int a, int b);
int multiply_right_shift(int a, int b);
int multiply_by_ten(int a);
float multiply_by_percentage(float num, float percentage);
int multiply_by_random(int num);
#endif // MULTIPLICATION_H