Java :: Aufgabe #43 :: Lösung #3
6 Lösungen

#43
99 Bottles of Beer - Selbstständige Lösung
Anfänger - Java
von pocki
- 11.01.2013 um 14:07 Uhr
Programmiere eine eigenständige Lösung zur gängigen Programmier-Übung bzw. Lied 99 Bottles of Beer
Ausgabe:
Ausgabe:
Konsolenausgabe:
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 99 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer.
... usw.
#3

von PTPHard (540 Punkte)
- 27.05.2014 um 22:48 Uhr

public class beer { public static void main(String[] args) { int _beer = 99; String _first = "bottles of beer on the wall, "; String _second = " bottles of beer."; String _third = "Take one down and pass it around, "; for(int i = 0; i<99; i++) { int counter = 1; System.out.println(_beer + " " + _first + _beer + _second); System.out.println(); _beer--; } } }
Kommentare:
Für diese Lösung gibt es noch keinen Kommentar
Seite 1 von 0
1