BabyBlackjack
Code
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 = 1 + r.nextInt(10);
int d = 1 + r.nextInt(10);
int x, y;
System.out.println( " You drew a " + a + " and " + b );
System.out.println( " Your total is " + (a+b));
System.out.println( " The dealer drew a " + c + " and " + d );
System.out.println( " His total is " + (c+d));
x=a+b;
y=c+d;
if(x > y)
{
System.out.println( " YOU WIN " );
}
else if(x < y);
{
System.out.println( " Dealer wins " );
}
if(x==y)
{
System.out.println( " Yeah IDK " );
}
}
}
BabyBlackjack