Assignemnt #59 and card.java

Code

    import java.util.Scanner;
    import java.util.Random;
    
    public class card{
        public static void main(String[] args){
            Scanner keyboard = new Scanner(System.in);
            
            Random r = new Random();
            
            int a, num = 1 + r.nextInt(3);
            
            System.out.println("GUESS");
            System.out.println();
            System.out.println(" ## ## ##");
            System.out.println(" ## ## ##");
            System.out.println(" 1  2  3 ");
            System.out.println();
            System.out.print("> ");
            a = keyboard.nextInt();
            System.out.println();
            
            if (a==num && num == 1){
                System.out.println("You are CORRECT!");
                System.out.println();
                System.out.println(" AA ## ##");
                System.out.println(" AA ## ##");
                System.out.println(" 1  2  3 ");
            }
            
            else if (a==num && num==2){
                System.out.println("You are CORRECT!");
                System.out.println();
                System.out.println(" ## AA ##");
                System.out.println(" ## AA ##");
                System.out.println(" 1  2  3 ");
            }
            
            else if (a==num && num == 3){
                System.out.println("You are CORRECT!");
                System.out.println();
                System.out.println(" ## ## AA");
                System.out.println(" ## ## AA");
                System.out.println(" 1  2  3 ");
            }
            
            else {
                System.out.println("it was " + num + " ! ");
                System.out.println();
                {   if (num == 1){
                    System.out.println(" AA ## ##");
                    System.out.println(" AA ## ##");
                    System.out.println(" 1  2  3 ");
                    }
                 
                 else if (num == 2){
                    System.out.println(" ## AA ##");
                    System.out.println(" ## AA ##");
                    System.out.println(" 1  2  3 ");
                 }
                 
                 else if (num==3){
                    System.out.println(" ## ## AA");
                    System.out.println(" ## ## AA");
                    System.out.println(" 1  2  3 ");
                 }
                 
                }
            }
        }
    }
        
        
                   
    

Picture of the output

Assignment 59