Assignemnt #71

Code

    ///Name: Joshua Bautista
    ///Period: 6
    ///Project Name: KeepGuesing
    ///File Name: keepGuesing.java
    ///Date: 1/7/2016
    
    import java.util.Random;

public class DiceDoubles
{
    public static void main( String[] args )
    {
        Random r = new Random();
        int x = 1 + r.nextInt(6);
        int y = 1 + r.nextInt(6);
        int total = ( x + y );
        System.out.println();
        System.out.println(" Here comes the dice! ");
        System.out.println();
        do 
        {
         x = 1 + r.nextInt(6);
         y = 1 + r.nextInt(6);
         total = ( x + y );
        System.out.println(" Roll #1: " + x );
        System.out.println(" Roll #2: " + y );
        System.out.println(" The total is " + total + " ! " );
        System.out.println();
        }
        while ( x != y );
            {
                System.out.println();
            }
        
       
        }
    }
    

Picture of the output

Assignment 1