Assignment 62: Dice Doubles

Code

    /// Name: Ryan McAteer
    /// Period: 5
    /// Program Name: Dice Doubles
    /// File Name: Assignment62.java
    /// Date Finished: 12/2/15
    
import java.util.Random;

public class Assignment62
{
    public static void main ( String[] args )
	{
		Random r = new Random();
        System.out.println("HERE COMES THE DICE!");
        int diceOne = 1 + r.nextInt(6);
        int diceTwo = 1 + r.nextInt(6);
        int total = diceOne + diceTwo;
        System.out.println();
        System.out.println("Roll #1: " + diceOne + ".");
        System.out.println("Roll #2: " + diceTwo + ".");
        System.out.println("Total: " + total + ".");
        
        while ( diceOne != diceTwo )
        {
            diceOne = 1 + r.nextInt(6);
            diceTwo = 1 + r.nextInt(6);
            System.out.println();
            System.out.println("Roll #1: " + diceOne + ".");
            System.out.println("Roll #2: " + diceTwo + ".");
            System.out.println("Total: " + total + ".");
        }
        System.out.println("As you can see, the total is " + total + ".");
    }
}
    

Picture of the output

This Should Work