Language Sather
Date: | 04/20/05 |
Author: | David Stoutamire |
URL: | n/a |
Comments: | 1 |
Info: | http://www.icsi.berkeley.edu/Sather |
Score: | ![]() |
-- Sather for 99 Bottles of Beer -- -- David Stoutamire (davids@icsi.berkeley.edu) class MAIN is main is loop b::=99.downto!(1); #OUT + bob(b) + " on the wall, " + bob(b) + ".\n" + "Take one down, pass it around, " + bob(b-1) + " on the wall.\n\n"; end end; bob(i:INT):STR is case i when 0 then return "no more bottles of beer"; when 1 then return "1 bottle of beer"; else return i.str + " bottles of beer"; end end end
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
A more elaborate version | Michael Talbot-Wilson | 06/06/09 | 3 | ![]() ![]() |
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