Assignemnt # and
Code
///Name: Dakota Donahue
///Period: 5
///Project Name:
///File Name:
///Date: 3/10/2016
import java.util.Random;
public class ShorterDiceDoubles
{
public static void main ( String[] args )
{
Random r = new Random();
int a = 0;
int b = 0;
int c = (a+b);
do
{
a = 1 + r.nextInt(6);
b = 1 + r.nextInt(6);
System.out.println( " Here comes the dice! " );
System.out.println( "Roll #1: " + a );
System.out.println( "Roll #2: " + b );
c = (a+b);
System.out.println( " The total is " + c + " ! " );
} while ( a != b );
}
}