25 lines
582 B
Plaintext
25 lines
582 B
Plaintext
public class Verzweigung {
|
|
public static void main(String args[]) {
|
|
int alter = 30;
|
|
if(alter <= 20) {
|
|
System.out.println("Du bist noch jung");
|
|
}
|
|
|
|
else if (alter < 30) {
|
|
System.out.println("ISt noch ok!");
|
|
}
|
|
else if (alter < 40) {
|
|
System.out.println("Grenzwertig :-P");
|
|
}
|
|
else if (alter < 50) {
|
|
System.out.println("Die Rente ist in sicht");
|
|
}
|
|
else if (alter < 60) {
|
|
System.out.println("Bist du baer alt");
|
|
}
|
|
|
|
else {
|
|
System.out.println("Na, ganz frish");
|
|
} // end of if-else
|
|
}
|
|
} |