|
|
@ -1,5 +1,7 @@ |
|
|
|
#include "multiplication.h" |
|
|
|
#include <stdio.h> |
|
|
|
#include <string.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double multi( double ein1, double ein2) { |
|
|
@ -33,6 +35,14 @@ int multiply_by_random(int num) { |
|
|
|
return num * random_factor; |
|
|
|
} |
|
|
|
|
|
|
|
int multiply_string(const char* str, int factor) { |
|
|
|
int len = strlen(str); |
|
|
|
int result = 0; |
|
|
|
for (int i = 0; i < len; i++) { |
|
|
|
result += str[i] * factor; |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|