Assignment #57 and Dice
Code
/// Name: Ali Kurland
/// Period: 6
/// Program Name: Dice
/// File Name: Dice.java
/// Date Finished: 10/7/2015
import java.util.Random;
public class Dice
{
public static void main ( String[] args )
{
Random r = new Random();
choice1 = 1 + r.nextInt(6);
int choice2 = 1 + r.nextInt(6);
System.out.println( "HERE COMES THE DICE!" );
System.out.println( " " );
System.out.println( "Roll #1: " + choice1 );
System.out.println( "Roll #2: " + choice2 );
System.out.println( "The total is " + ( choice1 + choice2 ) + "!" );
}
}
Picture of the output