# PLZ HELP MEH IMPROVA MEH LOLCAT CODEZ, WHUCH CALCULUTS FAWCTORIALS

SUNCE MEH BEEN WRUTEN CODEZ IN MUNY DIFFRNT PROGRAMMING LANGUAGES, MEH THOUGHTZ THAT ME TRY TO WRITE CODEZ IN AN ESOTERIC LANGUAGE. MEH CODEZ CALCULUTS A FAWCTORIAL OF UH USR INPUTTED NUMBAH IN LOLCODE, LOL.

SOME OF MEH QUSTIONS:

• IZ MEH CODEZS A IDMITIC LOLCAT PROGUM?
• IZ THERE A GOODER WAY OF WRUTING MEH factorial FUNCSHUNS?

TRANSLATION:

Since I've been writing and trying programs in many different languages, I thought I'd give esoteric language a crack. So I used LOLCODE to write a program that calculates the factorial of a user given number:

Questions for consideration:

• Is my LOLCODE code idiomatic to the LOLCODE language?
• Is there a easier way to write my factorial function?

## LOLCAT.lol

BTW Calculates the factorial for a user given integer

BTW Author: Pythonic
BTW Version: 1.0

HAI 1.2
HOW DUZ I factorial YR n
BOTH SAEM n AN 0, O RLY?
YA RLY
FOUND YR 1
NO WAI
FOUND YR PRODUKT OF n AN factorial DIFF OF n AN 1
OIC
IF U SAY SO

HOW DUZ I main
I HAS A user_input

VISIBLE "ENTER AN NUMBAH"
VISIBLE "TO FINDZ ITZ FAWCTORIAL:: "

GIMMEH user_input

VISIBLE "DE FAWCTORIAL OF " user_input " IZ:: " factorial user_input
VISIBLE "KTHXBYE!"
IF U SAY SO

main
KTHXBYE


For those of you who are not fortunate enough to have a LOLCODE compiler, here is a link to a REPL.IT of the code.

NOTE: All answer must be given in proper LOLCODE English, with an optional translation in regular English. Failure to do so will result in me releasing my LOLCATS upon you....

• user_input in lolcode ??? YU_TOLD? Commented Oct 14, 2016 at 6:39