Advertisement
Guest User

Untitled

a guest
Nov 2nd, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cffunction name="fibMe" returntype="string" output="false">
  2.     <cfargument name="total" required="yes" type="numeric">
  3.  
  4.     <cfset n1 = 0>
  5.     <cfset n2 = 1>
  6.     <cfset list = "#n1#,#n2#">
  7.  
  8.     <cfloop index="f" from="1" to="#ARGUMENTS.total#">
  9.         <cfset n3 = n1 + n2>
  10.         <cfset list = ListAppend(list,n3)>
  11.         <cfset n1 = n2 = n3>
  12.     </cfloop>
  13.     <cfreturn list>
  14. </cffunction>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement