Language Plain English
| Date: | 02/16/06 |
| Author: | The Osmosian Order |
| URL: | http://www.osmosian.com |
| Comments: | 15 |
| Info: | http://www.osmosian.com |
| Score: |
To sing the beer song: Put 99 into a number. Loop. If the number is 0, break. Format a string given the number and "bottle" and "bottles". Write the string then " of beer on the wall, " then the string then " of beer.". Format another string given the number minus 1 and "bottle" and "bottles". Write "Take one down and pass it around, " then the other string then " of beer on the wall.". Skip a line. Subtract 1 from the number. Repeat. Write "No more bottles of beer on the wall, no more bottles of beer.". Write "Go to the store and buy some more, 99 bottles of beer on the wall.". To format a string given a number and a singular string and a plural string: If the number is 0, put "no more " then the plural into the string; exit. If the number is 1, put "1 " then the singular into the string; exit. Put the number then " " then the plural into the string.
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
plain english has too much text, my eyes gets tired really fast.
Dangerous work.
"99 bottles of beer on the wall, 99 bottles of beer."
"Take one down, pass it around, -1 bottles of beer on the wall."
"Go to the store, buy some more, 99 bottles of beer on the wall."
Is there something wrong with my compiler?
If the language is sufficiently powerful, it's possible.
if not i will create one...
visit my blog at: http://nano-systems.blogspot.com/ and tell me if you are with me