User:Binari: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 97: | Line 97: | ||
} |
} |
||
} |
} |
||
</lang |
</lang> |
||
==99 Bottles of Beer== |
==99 Bottles of Beer== |
||
<lang java> |
<lang java> |
||
/* package whatever; // don't place package name! */ |
/* package whatever; // don't place package name! */ |
||
import java.util.*; |
|||
import java.lang.*; |
|||
import java.io.*; |
|||
/* Name of the class has to be "Main" only if the class is public. */ |
|||
class Ideone |
|||
{ |
|||
public static void main (String[] args) throws java.lang.Exception |
|||
{ |
|||
for (int i=99; i>=1; i--) { |
|||
System.out.println(i+" bottles of beer on the wall, "+i+" bottles of beer"); |
|||
System.out.println("Take one down and pass it around, "+(i-1)+" bottles of beer on the wall."); |
|||
System.out.println(); //no grammar |
|||
}/* package whatever; // don't place package name! */ |
|||
import java.util.*; |
import java.util.*; |
||
Line 117: | Line 132: | ||
System.out.println(); //no grammar |
System.out.println(); //no grammar |
||
} |
} |
||
} |
|||
} |
|||
} |
} |
||
} |
} |