Factorial in LOLCODE
Example for versions
loljs 1.1
This example uses iterative factorial definition.
HAI
I HAS A N ITZ 0
I HAS A FACTORIAL ITZ 1
IM IN YR LOOP UPPIN YR N WILE N SMALLR THAN 17
VISIBLE SMOOSH N "! = " FACTORIAL
FACTORIAL R PRODUKT OF FACTORIAL AN SUM OF N AN 1
IM OUTTA YR LOOP
KTHXBYE
Comments
]]>blog comments powered by Disqus
]]>