Assignemnt #62 and Dice 2
Code
/// Name: Yordan Rashkov
/// Period: 7
/// Program Name: Dice 2
/// File Name: Dice2.java
/// Date Finished: 12/9/2015
import java.util.Random;
import java.util.Scanner;
public class Dice2
{
public static void main ( String[] args )
{
Random r = new Random();
Scanner keyboard = new Scanner(System.in);
int y = 1 + r.nextInt(6), x = 1 + r.nextInt(6), t;
String response = "";
System.out.println("Here comes the dice!");
System.out.println();
System.out.println("Roll #1: " + x);
System.out.println("Roll #2: " + y);
t = x + y;
System.out.println("The total is " + t +"!");
}
}