Mercurial > repo
view src/ploki/examples/fac.pk @ 11633:a56795ce5d0a draft
<oerjan> le/rn hammurabi//If anyone creates a webpage that unexpectedly starts playing sounds, he shall be put to death. http://45338297.weebly.com/laws-on-property-and-theft.html
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Tue, 23 Oct 2018 23:09:55 +0000 |
parents | ac0403686959 |
children |
line wrap: on
line source
"calculate the faculty of [1..8]: "ß{ REM faculty program in false and ploki REM Lukas Mai, 11.09.2003 REM} [$1=$[\%1\]?~[$1-f;!*]?]f: ^'0-$$0>~\8>|$ { LET n @LEGS(\EING) REM} "result: "ß{ IF n < 1 | (n > 8) REM} ~[\f;!.]?[ "illegal input"ß{ ELSE LET f 1 FOR loop IF n > 0 LET f f * n LET n n - 1 NEXT loop FI WUNT f FI REM} ]?" "