1 /**
2 This program simulates tosses of a pair of dice.
3 */
4 public class Dice
5 {
6 public static void main(String[] args)
7 {
8 for (int i = 1; i <= 10; i++)
9 {
10 // Generate two random numbers between 1 and 6
11
12 int d1 = (int) (Math.random() * 6) + 1;
13 int d2 = (int) (Math.random() * 6) + 1;
14 System.out.println(d1 + " " + d2);
15 }
16 System.out.println();
17 }
18 }