Program to find greater value between a ^ n and b ^ n | Function to find the greater value ; If n is even ; Driver code
< ? php function findGreater ( $ a , $ b , $ n ) { if ( ! ( $ n & 1 ) ) { $ a = abs ( $ a ) ; $ b = abs ( $ b ) ; } if ( $ a == $ b ) echo " a ^ n ▁ is ▁ equal ▁ to ▁ b ^ n " ; else if ( $ a > $ b ) echo " a ^ n ▁ is ▁ greater ▁ than ▁ b ^ n " ; else echo " b ^ n ▁ is ▁ greater ▁ than ▁ a ^ n " ; } $ a = 12 ; $ b = 24 ; $ n = 5 ; findGreater ( $ a , $ b , $ n ) ; ? >