Posted By

shakaar on 08/05/10


Tagged


Versions (?)

Raise


 / Published in: ColdFusion
 

  1. <cffunction name="raise">
  2. <cfargument name="base">
  3. <cfargument name="power">
  4.  
  5. <cfif power EQ 0>
  6. <cfreturn 1>
  7. <cfelse>
  8. <cfreturn base * raise(base,power-1)>
  9. </cfif>
  10. </cffunction>
  11.  
  12. <cfdump var="#raise(2,6)#">

Report this snippet  

You need to login to post a comment.