Assignemnt #89 Baby Blackjack
Code
///Name: Prooz Fereydouni
///Period: 7
///Project Name: Baby Blackjack
///File Name: BB.java
///Date: 3/3/2016
import java.util.Random;
public class BB
{
public static void main( String[] args)
{
Random r = new Random();
System.out.println("Welcome to Baby Blackjack");
System.out.println("");
int x = 1 + r.nextInt(10);
int y = 1 + r.nextInt(10);
int a = x+y;
System.out.println("You draw: " + x + " and " + y + ".");
System.out.println("Your total is " + a + ".");
System.out.println("");
int z = 1 + r.nextInt(10);
int w = 1 + r.nextInt(10);
int b =z+w;
System.out.println("You draw: " + z + " and " + w + ".");
System.out.println("Your total is " + b + ".");
System.out.println("");
if(a>b)
{
System.out.println("YOU WIN!");
}
else if(a
Picture of the output