Sarah Smith
Jan 21, 2021

--

Good post, and good advice. I think they may have been looking for a test of your mathematics skills - when I saw this post, I thought of using logarithms to solve this problem.

https://github.com/sarah-j-smith/chestnuts/blob/master/powerof/powerof.cpp

I could not remember the exact formula for change of base, but I found it with Google in a minute.

There are some issues with these examples of numeric limits as well - but I have glossed over those in my code.

--

--

Sarah Smith
Sarah Smith

Written by Sarah Smith

Sarah Smith is a writer & app developer .

No responses yet