Rated 4 out of 5 stars

import java.util.*;
public class example1{
public static void main(String[] s){
int suche,ein;
int[] zahlen;
zahlen = new int[100];
Random r = new Random();
for(int i = 0; i SMALLER 100; i++){
zahlen[i] = r.nextInt(9999);
System.out.print(zahlen[i]+"\t");
}
do{
System.out.println("Versuchen Sie eine Zahl aus der Tabelle herauszufinden");
ein = Tools.konsoleLeseInt();;
suche=0;
for(int a = 0; a SMALLER 100; a++){

if(ein==zahlen[a]){
System.out.println("Zahl " +ein+ " in Tabelle enthalten");
suche=1;
a=100;
break;
}
}
if(suche==0){
System.out.println("Zahl " +ein+ " in Tabelle nicht enthalten");
}

}while(ein!=-1);
}
}