Assignment #89 Baby Blackjack

Code

      ///Name: Ian Grant
      ///Period:5
      ///Project Name: Baby Blackjack
      ///File Name:Blackjack.java
      ///02/04/16
      
      import java.util.Random;
      public class Blackjack
      {
          public static void main(String [] args)
          {
              Random r = new Random();
              int p1 = 1 + r.nextInt(10);
              int p2 = 1 + r.nextInt(10);
              int c1 = 1 + r.nextInt(10);
              int c2 = 1 + r.nextInt(10);
              System.out.println("Baby blackjack");
              System.out.println("You drew a "+p1+" and a "+p2+".");
              System.out.println("Your total is "+(p1+p2)+".");
              System.out.println("The dealer has "+c1+" and a "+c2+".");
              System.out.println("The total is "+(c1+c2)+".");
              if ((p1+p2)>(c1+c2))
                  System.out.println("You win");
              else
                  System.out.println("You lose");
          }
      }
      

Output