Language Obliq
Date: | 04/20/05 |
Author: | David Eddyshaw |
URL: | n/a |
Comments: | 0 |
Info: | n/a |
Score: | ![]() |
(* 99 Bottles of Beer in Obliq; by David Eddyshaw, david@jeddyshaw.freeserve.co.uk See http://www.research.compaq.com/SRC/modula-3/html/home.html *) let bottles = proc(n) if n is 0 then wr_putText(wr_stdout, "No more bottles"); elsif n is 1 then wr_putText(wr_stdout, "1 bottle"); else wr_putText(wr_stdout, fmt_int(n) & " bottles"); end; end; var n = 99; loop if n is 0 then exit end; bottles(n); wr_putText(wr_stdout, " of beer on the wall,\n"); bottles(n); wr_putText(wr_stdout, " of beer.\n"); wr_putText(wr_stdout,"Take one down and pass it around;\n"); bottles(n - 1); wr_putText(wr_stdout, " of beer on the wall.\n\n"); n := n - 1; end;
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments