Scanner s = new Scanner(System.in);
System.out.println("Type a number");
int n = s.nextInt();
int start = 0;
int largest = 0;
int occurrence = 0;
while(n > start){
int number = (int)(Math.random()*100);
if(number > largest){
largest = number;
}
n--;
System.out.print(number+" ");
}
System.out.println("max is "+largest);
System.out.println("Occurrence is "+occurrence);