rosetta code
Monkey Archive Forums/Monkey Discussion/rosetta code
| ||
99 bottles of beer, and no monkey. http://rosettacode.org/wiki/99_Bottles_of_Beer i suppose one is in order? i guess one that shows off some features like generic types or interfaces? |
| ||
I shoved a quick version up, feel free to do a better one tho if you want .. |
| ||
I wrote a quick version... doesn't show off any features, just uses a simple recursive function.Function Main() BeerWall( 99 ) End Function Function BeerWall( amount : Int ) If amount = 0 Then Return Print amount + " bottles of beer on the wall" Print amount + " bottles of beer" Print "Take one down, pass it around" Print ( amount - 1 ) + " bottles of beer on the wall" BeerWall( amount - 1 ) End Function |
| ||
your missing part of the song at the end. but yeah thats a lot slicker than what I added. |
| ||
are you sure? looks fine to me. (you might have to scroll down a bit to see the last few lines) |
| ||
it's the little goto the store and buy some more bit at the end your missing, at least I cant see it. |
| ||
ah ok I didn't add those lines, I copied the structure from the link:X bottles of beer on the wall X bottles of beer Take one down, pass it around X-1 bottles of beer on the wall X-1 bottles of beer on the wall ... Take one down, pass it around 0 bottles of beer on the wall |