DiceAgain

Code

import java.util.Random;

public class DiceAgain
{
	public static void main ( String[] args )
	{
		Random r = new Random();

		int choice = 1 + r.nextInt(6);
		String response = "";
        
        System.out.println(" Dice 1 : " + choice);
        
        int choice1 = 1 + r.nextInt(6);
        
        System.out.println(" Dice 2 : " + choice1);
        
        System.out.println( " The total is " + (choice+choice1) );
     
        while ( choice != choice1 )
        {
        choice = 1 + r.nextInt(6);
		
        
        System.out.println(" Dice 1 : " + choice);
        
        choice1 = 1 + r.nextInt(6);
        
        System.out.println(" Dice 2 : " + choice1);
        
        System.out.println( " The total is " + (choice+choice1) );
        }
            
    }
}

DiceAgain

Assignment 62