Language NetLogo
(Some kind of logo for Multi Agent System)
Date: | 07/16/10 |
Author: | Antoine Cervoise |
URL: | http://www.antoine-cervoise.fr |
Comments: | 0 |
Info: | http://ccl.northwestern.edu/ |
Score: | (4.43 in 193 votes) |
to bottle [i] ifelse i = 1 [type "1 bottle of beer"] [ ifelse i = 0 [type "no more bottles of beer"] [type i type " bottles of beer"] ] end to verse [i] bottle i type " on the wall, " bottle i print "" type "Take one down and pass it around, " bottle i - 1 type " on the wall." print "" print "" end to sing [i] if i = 0 [ type "No more bottles of beer on the wall, no more bottles of beer." print "" type "Go to the store and buy some more, 99 bottles of beer on the wall." print "" stop ] verse i sing i - 1 end ;using sing 99
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