Assignemnt #57

Code

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

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

Picture of the output

Assignment 1