
/*
    A program that simulates rolling a pair of dice and reports the results.
*/

public class Dice {

   public static void main(String[] args) {

      int firstDie  = (int)(6 * Math.random()) + 1;  // Roll one die.
      int secondDie = (int)(6 * Math.random()) + 1;  // Roll the other die.
      int totalRoll = firstDie + secondDie;          // Total of the two dice.

      System.out.println("The dice came up " + firstDie + " and " +
                                 secondDie + " for a total of " + totalRoll);

   }  // end main()

} // end class Dice
