99 bottles of beer: Difference between revisions

Added Java, needed to spearate the verses in BASIC version
(New page: {{puzzle}}In this puzzle, print out the entire "99 bottles of beer on the wall" song. For those who do not know the song, the lyrics follow this form: X bottles of beer on the wall X bot...)
 
(Added Java, needed to spearate the verses in BASIC version)
Line 20:
PRINT "Take one down, pass it around"
PRINT x-1; "bottles of beer on the wall"
PRINT
NEXT x</qbasic>
 
Line 30 ⟶ 31:
}
}</c>
 
=={{header|Java}}==
<java>public class Beer{
public static void main(String[] args){
for(int x = 99;x>=1; --x)
System.out.println(x+"bottles of beer on the wall\n"+x+"bottles of beer\n"+"Take one down, pass it around\n"+(x-1)+"bottles of beer on the wall\n");
}
}</java>
Anonymous user