Snippets

Ettar Java - While-Scheife

Created by Ettar
1
2
3
4
5
6
7
8
9
public static void main(String[] ARGS){
    Scanner scanner = new Scanner(System.in);
    int gesucht = 3;

    while(scanner.nextInt()!=gesucht){
        System.out.println("Falsche Zahl");
    }
    System.out.println("Richtig! Die gesuchte Zahl war 3");
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.