annotate src/ploki/examples/hanoi.pk @ 5983:e9e46956a506
<oerjan> mk wisdom/welcome.sv//Hej och v\xc3\xa4lkommen till den internationella knutpunkten f\xc3\xb6r esoterisk programmeringsspr\xc3\xa5ksdesign och -drifts\xc3\xa4ttning! F\xc3\xb6r mer information, se v\xc3\xa5r wiki: <http://esolangs.org/>. (F\xc3\xb6r den andra sortens esoterism, pr\xc3\xb6va #esoteric p\xc3\xa5 EFnet eller DALnet.)
author |
HackBot |
date |
Mon, 14 Sep 2015 17:49:06 +0000 |
parents |
ac0403686959 |
children |
|
rev |
line source |
4223
|
1 #!../ploki
|
|
2 IF \ARG < 2
|
|
3 WUNT "Usage: \V\ARG:0 NUMBER\n"
|
|
4 END -1
|
|
5 FI
|
|
6 LET a "a"
|
|
7 LET b "b"
|
|
8 LET c "c"
|
|
9 move \ARG:1
|
|
10 WUNT "\n"
|
|
11 END
|
|
12 FOR move IF \@ > 0
|
|
13 LEET ax a
|
|
14 LEET bx b
|
|
15 LEET cx c
|
|
16 LET b cx
|
|
17 LET c bx
|
|
18 move \@ - 1
|
|
19 WUNT (ax_bx_" ")
|
|
20 LET a cx
|
|
21 LET b bx
|
|
22 LET c ax
|
|
23 move \@ - 1
|
|
24 FI
|
|
25 KTHX
|