import java.util.*;
public class RollDice2
{
public static void main(String [] args)
{
Scanner input= new Scanner(System.in);
int dice=0,rolls=0;
System.out.println("Enter the number of dice you wish to use");
dice=input.nextInt();
System.out.println("Enter the number of rolls you wish to use");
rolls=input.nextInt();
int frequencies[ ] = new int[6*dice + 1];
// set each cell in frequencies to 0
for (int i=0; i<frequencies.length; i++)
frequencies[i] = 0;
// roll the dice
for (int i=0; i<rolls; i++) {
int total = RollDice2.throwDice(dice);
//System.out.print("-");
frequencies[total]++;
for(int s=0;s<total; s++)
System.out.println(total+"- ");
}
}
public static int throwDice(int count){
count =(int)(1+6*(Math.random()));
return count; }
}