[Solved] why error showing: too few arguments to function? [closed]


You forgot the second argument to your log function in the recursive step.

return (n>1) ? 1 + log(n/x, x) : 0;

By the way, you should name your variables something descriptive. For instance instead of using n perhaps use base.

3

solved why error showing: too few arguments to function? [closed]