How to check if a number N is integer power of another number B

Revision en1, by Ishtiaq11, 2017-03-30 08:47:47

I have two integer b,n. I need to check if the number n is integer power of number b. For example: 100 is an integer power of 10. As 10^2 = 100. But 110 is not an integer power of 10. How to determine this in coding?

Tags basic math

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Ishtiaq11 2017-03-30 08:47:47 317 Initial revision (published)