Skip to content

Commit

Permalink
Example script for '99 bottles of beers on the wall'.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Sep 26, 2024
1 parent bb04cf6 commit 288d36a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/99-beers.zhv
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/zhivo

val count = 99;

while(count > 0) {
val bottle = if(count == 1) "bottle" else "bottles";

render! count + " " + bottle + " of beer on the wall";
render! count + " " + bottle + " of beer,";
render! "Take one down, pass it around,";

count = count - 1;

if(count > 0)
render! count + " " + bottle + " of the beer on the wall.\r\n"
else render! "\r\nNo more " + bottle + " of beer on the wall.";
};

0 comments on commit 288d36a

Please sign in to comment.