Language JSP
(Proper version (works)
| Date: | 01/24/06 |
| Author: | Davy Boy Hayes |
| URL: | http://www.smarterthings.co.uk |
| Comments: | 0 |
| Info: | n/a |
| Score: |
<% int beers = 99;
while (beers > 0) {
int loop = 2;
while (loop > 0) { %>
<%=beers%> bottle<%= beers!=1 ? "s":""%> of beer<%= loop-- ==2 ? " on the wall, " : "<br>"%>
<% } %>
Take one down pass it around,
<%= --beers>0 ? ""+beers:"no more"%> bottle<%= beers!=1 ? "s":""%> of beer on the wall.<br><br>
<% } %>
No more bottles of beer on the wall, no more bottles of beer<br>
Go to the store, buy some more, 99 bottles of beer on the wall.<br>
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