Driver program to test above function
int main ( ) { int n = 64 , d = 8 ; if ( isPowerOfd ( n , d ) ) printf ( " % d ▁ is ▁ a ▁ power ▁ of ▁ % d " , n , d ) ; else printf ( " % d ▁ is ▁ not ▁ a ▁ power ▁ of ▁ % d " , n , d ) ; return 0 ; }