c++ log with base code example
Example 1: log base c++
int intlog(double base, double x) {
return (int)(log(x) / log(base));
}
Example 2: log base 10 c+_+
double log10(double x)
int intlog(double base, double x) {
return (int)(log(x) / log(base));
}
double log10(double x)