From 6413e37c4fce731a2a5a57e767e97a99928b37c6 Mon Sep 17 00:00:00 2001 From: Christopher Clarke Date: Mon, 13 Jan 2014 15:25:50 -0330 Subject: [PATCH] Add "99 bottles of beer" example in Potion --- example/99bottles.pn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 example/99bottles.pn diff --git a/example/99bottles.pn b/example/99bottles.pn new file mode 100644 index 0000000..1e0955c --- /dev/null +++ b/example/99bottles.pn @@ -0,0 +1,18 @@ +count = 99 +99 times: + "\n" print + if (count == 1): + (count, " bottle of beer on the wall\n") join print + (count, " bottle of beer\n") join print. + else: + (count, " bottles of beer on the wall\n") join print + (count, " bottles of beer\n") join print. + + "Take one down, pass it around\n" print + count = count - 1 + if (count == 1): + (count, " bottle of beer on the wall\n") join print. + else: + (count, " bottles of beer on the wall\n") join print. + "\n" print. +"No more bottles of beer on the wall\n" print