Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
27
Task/Catamorphism/LOLCODE/catamorphism.lol
Normal file
27
Task/Catamorphism/LOLCODE/catamorphism.lol
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
HAI 1.3
|
||||
|
||||
HOW IZ I reducin YR array AN YR size AN YR fn
|
||||
I HAS A val ITZ array'Z SRS 0
|
||||
IM IN YR loop UPPIN YR i TIL BOTH SAEM i AN DIFF OF size AN 1
|
||||
val R I IZ fn YR val AN YR array'Z SRS SUM OF i AN 1 MKAY
|
||||
IM OUTTA YR loop
|
||||
FOUND YR val
|
||||
IF U SAY SO
|
||||
|
||||
O HAI IM array
|
||||
I HAS A SRS 0 ITZ 1
|
||||
I HAS A SRS 1 ITZ 2
|
||||
I HAS A SRS 2 ITZ 3
|
||||
I HAS A SRS 3 ITZ 4
|
||||
I HAS A SRS 4 ITZ 5
|
||||
KTHX
|
||||
|
||||
HOW IZ I add YR a AN YR b, FOUND YR SUM OF a AN b, IF U SAY SO
|
||||
HOW IZ I sub YR a AN YR b, FOUND YR DIFF OF a AN b, IF U SAY SO
|
||||
HOW IZ I mul YR a AN YR b, FOUND YR PRODUKT OF a AN b, IF U SAY SO
|
||||
|
||||
VISIBLE I IZ reducin YR array AN YR 5 AN YR add MKAY
|
||||
VISIBLE I IZ reducin YR array AN YR 5 AN YR sub MKAY
|
||||
VISIBLE I IZ reducin YR array AN YR 5 AN YR mul MKAY
|
||||
|
||||
KTHXBYE
|
||||
Loading…
Add table
Add a link
Reference in a new issue