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

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -