31 lines
700 B
Java
31 lines
700 B
Java
|
import java.util.Scanner;
|
|||
|
|
|||
|
public class AufgabeVerzweigung {
|
|||
|
|
|||
|
public static void main(String[] args) {
|
|||
|
// TODO Auto-generated method stub
|
|||
|
|
|||
|
System.out.println("Wieviele Bundesl<73>nder hat Deutschland?");
|
|||
|
System.out.println("15 oder 3 oder 16 oder 30");
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Scanner scan = new Scanner(System.in);
|
|||
|
int eingabeUser = scan.nextInt();
|
|||
|
|
|||
|
if (eingabeUser == 15) {
|
|||
|
System.out.println("Falsch!");
|
|||
|
}else if ( eingabeUser == 3) {
|
|||
|
System.out.println("Falsch!");
|
|||
|
}else if (eingabeUser == 16) {
|
|||
|
System.out.println("Richtig!");
|
|||
|
System.out.println("Wie hei<65>t die Bundeskanzlerin?");
|
|||
|
}else if ( eingabeUser == 30) {
|
|||
|
System.out.println("Falsch!");
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
scan.close(); }
|
|||
|
|
|||
|
}
|