Assignemnt #62 Double Dice

Code

    ///Name: Prooz Fereydouni
    ///Period: 7
    ///Project Name: Double Dice
    ///File Name: DD.java
    ///Date: 12/10/2015
  
import java.util.Random;

public class DD
{
    public static void main (String[] args)
    {
        Random r = new Random();
        int Dice1, Dice2, total;
        Dice1 = 1 + r.nextInt(6);
        Dice2 = 1 + r.nextInt(6);
        total = Dice1 + Dice2;
        System.out.println("HERE COMES THE DICE!");
        System.out.println("");
        System.out.println("Roll #1: " + Dice1);
        System.out.println("Roll #2: " + Dice2);
        System.out.println("The total is " + total);
        
        while(Dice1 != Dice2)
        {
            System.out.println("");
            Dice1 = 1 + r.nextInt(6);
            Dice2 = 1 + r.nextInt(6);
            total = Dice1 + Dice2;
            System.out.println("Roll #1: " + Dice1);
            System.out.println("Roll #2: " + Dice2);
            System.out.println("The total is " + total);
        }
            
    }
}



    

Picture of the output

assignment62