Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cffunction name="fibMe" returntype="string" output="false">
- <cfargument name="total" required="yes" type="numeric">
- <cfset n1 = 0>
- <cfset n2 = 1>
- <cfset list = "#n1#,#n2#">
- <cfloop index="f" from="1" to="#ARGUMENTS.total#">
- <cfset n3 = n1 + n2>
- <cfset list = ListAppend(list,n3)>
- <cfset n1 = n2 = n3>
- </cfloop>
- <cfreturn list>
- </cffunction>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement