|
@ -1,7 +1,7 @@ |
|
|
#include "multiplication.h" |
|
|
#include "multiplication.h" |
|
|
#include <stdio.h> |
|
|
#include <stdio.h> |
|
|
#include <string.h> |
|
|
#include <string.h> |
|
|
|
|
|
|
|
|
|
|
|
#include <math.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double multi( double ein1, double ein2) { |
|
|
double multi( double ein1, double ein2) { |
|
@ -31,7 +31,7 @@ float multiply_by_percentage(float num, float percentage) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int multiply_by_random(int num) { |
|
|
int multiply_by_random(int num) { |
|
|
int random_factor = rand() % 10 + 1; |
|
|
|
|
|
|
|
|
int random_factor = random_factor % 10 + 1; |
|
|
return num * random_factor; |
|
|
return num * random_factor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -108,5 +108,9 @@ int multiply_using_increment(int num1, int num2) { |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int multiply_by_prime_and_its_square(int num, int prime) { |
|
|
|
|
|
return num * (prime + square (prime)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|