ChooseA

Code

import java.util.Scanner;

public class ChooseA
{
    public static void main ( String[] args )
    {
        Scanner keyboard = new Scanner (System.in);
        
        String a, b, c, d;
        
        
        System.out.println( " You see two doors which one would you go into " );
        
        System.out.println( " Door one has a very bright light " );
        
        System.out.println( " Door two is pitch black " );
        a = keyboard.next();


        if ( a.equals("one"))
        {
            System.out.println( " Ever heard the term don't go towards the light, cause your getting sucked in " );
            System.out.println( " welp you got two choices keep going or throw a whip and escape(go / whip)" );
            b = keyboard.next();
            if ( b.equals("go"))
            {
                System.out.println( " Huh not best idea but can still work out " );
                System.out.println( " So do you want to keep going, leave, or whatever (go / leave / whatever) " );
                c = keyboard.next();
                
                if ( c.equals("go"))
                {
                    System.out.println( " Oh snap you stuck now " );
                }
                else if ( c.equals("leave"))
                {
                    System.out.println( " Ahhh how did that work, not gonna question it" );
                }
                else if ( c.equals("whatever"))
                {
                    System.out.println( " whatever!?!?! " );
                }
            }
            else if (b .equals("whip")) 
            {
                System.out.println( " Wow you actual hit it " );
                System.out.println( " So what now (let go / wait / climb) " );
                c = keyboard.next();
                
                if ( c.equals("let go"))
                {
                    System.out.println( " why?" );
                }
                else if ( c.equals("wait"))
                {
                    System.out.println( " is your face alright oh wait where is it " );
                }
                else if ( c.equals("climb"))
                {
                    System.out.println( " Ya you did it " );
                }
        }
        else if ( a.equals("two"))
        {
            System.out.println( " Dude did you seriously choose this one...well your dead now, so wanna see your dog? " );
        }
        }
    }
}

ChooseA

Assignment 45