import java.util.*;
public class Coin {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("How many times you want to flip?");
int time=input.nextInt();
int array[]=new int[time];
int showtime[]=new int[10];
int head=0,tail=0,most=0;
String output="";
System.out.println("Generate: ");
for (int x=0;x<time;x++) {
int a=(int) (Math.random()*10+1);
System.out.print(a+" , ");
array[x]=a;
showtime[a-1]++;
if (a%2==0) head++;
else tail++;
}
System.out.println();
for (int x=0;x<10;x++) {
System.out.println("No. \""+(x+1)+"\" showed "+showtime[x]+" time(s)");
if (showtime[x]>showtime[most]) {
most=x;
output="The number(s) that showed up the most: "+(x+1);
}
else if (showtime[x]==showtime[most])
output=output+" , "+(x+1);
}
System.out.println(output);
if (head>tail) System.out.println("Heads came up the most");
else if (head==tail) System.out.println("Heads=Tails");
else System.out.println("Tails came up the most");
}
}