Code archives/Algorithms/tiny factorial function
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
[a href=http://twitter.com/blitzbasic]The official blitzbasic twitter account[/a] had a request for a blitz program that fits in a tweet (140 characters) This little factorial function occurred to me - it's only 47 characters! It takes advantage of the fact that True is the same as the number 1 in bmax | |||||
Function f(n) Return n=1 Or n*f(n-1) End Function |
Comments
| ||
wow thats pretty um small. It may be useful though. |
Code Archives Forum