Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "99 bottles of beer" example in Potion
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |