This LOLCODE thing is just great, i must say. So much fun coding it, though many of the methods i’m used to in php is missing. Still, just today i wrote a FizzBuzz script and one that finds perfect numbers. Both need the % php operator (modulus calculation), so i made up the MOD word. It’s not much lolspeak, but better than nothing.
I read about this at Shamalt.
LOLCODE FizzBuzz
HAI
I HAS A BUZZER ITZ YARN
I HAS A INDEX ITZ NUMBAR
LOL INDEX R 0
IM IN YR BUZZER
LOL INDEX R INDEX UPZ!!
LOL TEMP R BUZZER
BTW i made up MOD coz i need it
IZ INDEX MOD 3 LIEK 0
YARLY LOL BUZZER R BUZZER N "Fizz"!
KTHX
IZ INDEX MOD 5 LIEK 0
YARLY LOL BUZZER R BUZZER N "Buzz"!
KTHX
IZ BUZZER LIEK TEMP
YARLY LOL BUZZER R BUZZER N INDEX
KTHX
IZ INDEX LIEK 100
YARLY GTFO
KTHX
KTHX
VISIBLE BUZZER
KTHXBYE
LOLCODE perfect
HAI
I HAS A NUM ITZ NUMBAR
I HAS A INDEX ITZ NUMBAR
I HAS A SUM ITZ NUMBAR
LOL INDEX R 0
LOL SUM R 0
GIEF NUM
IM IN YR LOOP
IZ INDEX LIEK NUM
YARLY GTFO
NOWAI UPZ INDEX!!
KTHX
IZ NUM MOD INDEX LIEK 0
YARLY SUM UPZ!!INDEX
KTHX
IZ SUM LIEK NUM
YARLY VISIBLE NUM N " is a perfect number"
NOWAI VISIBLE NUM N " is not a perfect number"
KTHX
KTHX
KTHXBYE