Assignemnt #62 and dice Doubles
Code
///name: nick cerdan
///period: 6
///program name: dice Doubles
///file name: ddoubles.java
///date finished: 10/21/15
import java.util.Random;
public class ddoubles
{
public static void main(String[] args)
{
Random r = new Random();
int roll1, roll2;
double total;
roll1 = 1 + r.nextInt(6);
roll2 = 1 + r.nextInt(6);
total = roll1 + roll2;
System.out.println("Here they come!");
System.out.println("");
while (roll1 != roll2)
{
roll1 = 1 + r.nextInt(6);
roll2 = 1 + r.nextInt(6);
total = roll1 + roll2;
System.out.println("Roll #1: " + roll1 );
System.out.println("Roll #2: " + roll2 );
System.out.println("The total is " + total );
System.out.println("");
}
}
}