Driver Code
public static void main ( String [ ] args ) { int n = 64 , d = 8 ; if ( isPowerOfd ( n , d ) ) System . out . println ( n + " ▁ is ▁ a ▁ power ▁ of ▁ " + d ) ; else System . out . println ( n + " ▁ is ▁ not ▁ a ▁ power ▁ of ▁ " + d ) ; } }