Assignment #57 Dice
Code
/// Name: DeeJay Cerezo
/// Period: 7
/// Program Name: Dice
/// File Name: Dice.java
/// Date Finished: 12/2/2015
import java.util.Random;
public class Dice
{
public static void main ( String[] args )
{
Random r = new Random();
System.out.println("HERE COMES THE DICE!");
int diceOne = 1 + r.nextInt(6);
System.out.println("ROLL ONE: " + diceOne + ".");
int diceTwo = 1 + r.nextInt(6);
System.out.println("ROLL TWO: " + diceTwo + ".");
System.out.println("The total is: " + (diceOne + diceTwo) + ".");
}
}
Picture of the output