Language Plain English
|Author:||The Osmosian Order|
|Score:||(3.04 in 145 votes)|
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.
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!