Assignment #89 and Baby Black Jack
Code
///John Mulligan
///period 5
///Program Name: BabyBlackJack
///File Name: BabyBlackJack.java
import java.util.Random;
public class BabyBlackJack
{
public static void main( String[] args )
{
Random r = new Random();
int Playerone = 1 + r.nextInt(10);
int Playertwo = 1 + r.nextInt(10);
int Dealerone = 1 + r.nextInt(10);
int Dealertwo = 1 + r.nextInt(10);
int PlayerTotal = Playerone + Playertwo;
int DealerTotal = Dealerone + Dealertwo;
System.out.println("Blackjack!");
System.out.println("");
System.out.println("You drew " + Playerone + " and " + Playertwo + ".");
System.out.println("Your total is " + Playertotal + ".");
System.out.println("");
System.out.println("The Dealer drew " + dealerOne + " and " + Dealertwo + "." );
System.out.println("The Dealer's total is " + dealerTotal );
if ( Dealertotal > Playertotal )
System.out.println("YOU LOOOSE!.");
else if ( dealerTotal < Playertotal )
System.out.println("WIN");
else
System.out.println("Stand Down its a Draw.");
}
}