import java.util.Random;
import java.util.Scanner;
public class arrayprac
{
public static void main(String args[])
{
Scanner scan= new Scanner(System.in);
Random dice=new Random();
int frequency[]=new int[7];
float probability[]=new float[7];
System.out.println("Enter the sample size");
int sample=scan.nextInt();
for(int counter=0;counter<sample;counter++)
{
++frequency[1+dice.nextInt(6)];
}
System.out.println("Face\tFrequency\tProbability");
probability(probability,sample);
for(int face=1;face<=6;face++)
{
System.out.println(face + "\t" + frequency[face] + probability[face]);
}
}
public static void probability(float x[], float s)
{
for(int element=0;element<=x.length;element++)
{
x/=s;
}
}
}