How would you write this exponent statement in PHP? -


how write exponent in php?

( ( ( ( (3) ^2 ) ^2 ) ^2 ) ^2 ) 

i took general programming test had problem similar had use algorithm provided write recursive function return result. numbers in question here 3 , 8 16.

you can use pow method code for, want can written -

pow(pow(pow(pow(3,2),2),2),2) 

see documentation here


Comments

Popular posts from this blog

mongodb - Struggling to get ordered results from the last retrieved article, given array of elements to search in -

c# - Pausing a storyboard on TabItem mouse over -

c# - Attribute value in root node of xml Linq to XML -