Language LUA
(version 5.x)
Date: | 07/10/05 |
Author: | chill |
URL: | n/a |
Comments: | 2 |
Info: | n/a |
Score: | ![]() |
--LUA 5.x by CHILL CODE -- for X = 99 to 2 -- X Bottles of beer on the wall, X bottles of beer. -- Take one down and pass it around, [X-1] bottles of beer on the wall. -- for X = 1 -- X Bottles of beer on the wall, X bottles of beer. -- Take one down and pass it around, no more bottles of beer on the wall. -- for X = 0 -- No more bottle of beer on the wall. No more bottles of beer... -- Go to the store and buy some more...99 bottles of beer. for i = 99, 2 do write( i.." Bottles of beer on the wall, "..i.." bottles of beer." ) write( "Take one down and pass it around, "..(i-1).." bottles of beer on the wall." ) end write( "1 Bottles of beer on the wall, 1 bottles of beer." ) write( "Take one down and pass it around, no more bottles of beer on the wall." ) write( "No more bottle of beer on the wall. No more bottles of beer... " ) write( "Go to the store and buy some more...99 bottles of beer." )
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
original version | Philippe Lhoste | 04/20/05 | 1 | ![]() ![]() |
5.1, bottled | Peter Cawley | 04/19/09 | 0 | ![]() ![]() |
Examples of metatables in lua 5.1 | Peter Cawley | 06/07/07 | 0 | ![]() ![]() |
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