Assignemnt # and
Code
///Name: Dakota Donahue
///Period: 5
///Project Name:
///File Name:
///Date: 3/10/2016
import java.util.Random;
public class BabyBlackjack
{
public static void main( String [] args )
{
Random r = new Random();
int a = 1 + r.nextInt(10);
int b = 1 + r.nextInt(10);
int c = a+b;
int x = 1 + r.nextInt(10);
int y = 1 + r.nextInt(10);
int z = x+y;
System.out.println( " You drew " + a + " and " + b + "." );
System.out.println( " You total is " + c );
System.out.println( " The dealer has " + x + " and " + y + "." );
System.out.println( " His total is " + z );
if ( c > z )
{
System.out.println( " YOU WIN! " );
}
else
{
System.out.println( " The dealer wins. " );
}
}
}