Assignment 71 and ShorterDD

Code

///Matthew Hughs
///Period 5
///ShorterDD
///ShorterDD.java
///1/7/2016

import java.util.Random;

class ShorterDD
{
    public static void main (String [] args)
    {
        Random r = new Random();
        
        int x, y;
        do
        {
        
            System.out.println("Let's Roll!");

             x = (1 + r.nextInt(6));  
             y = (1 + r.nextInt(6));

            System.out.println("Roll 1: " + x);
            System.out.println("Roll 2: " + y);
            System.out.println("The total is " + (x + y));

        } while ( x != y );
            

    }
}
    

Picture of the output

ShorterDD