log base 10 c++

#include <iostream>
#include <cmath>

int main() {
    double x = 1000;
    double result = log10(x);
    std::cout << "The base 10 logarithm of " << x << " is " << result << std::endl;
    return 0;
}