Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by Tierney ( 5 years ago )
/**
 *Its a mini adventure 
 * 
 * @tierney
 * 4-11-21
 */
import java.util.Scanner;
public class MiniAdventure
{
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        System.out.println("You have won the lottery but can't find the ticket.");
        System.out.println("If you want to check the parking lot press 0, if you want to check the couch press 1.");
        int num1 = in.nextInt();
         if(num1 == 0)
        {
            System.out.println("You can't find it. Press 1 to give up and  2 to check the couch");
            int num2 = in.nextInt();
            if(num2 == 2)
            {
                System.out.println("CONGRATULATIONS YOU HAVE WON THE LOTTERY");
            }
            if(num2 == 1)
            {
                System.out.println("You could not find the ticket. You fall into deep depression. ");
            }
        }
        if(num1 == 1)
            {
                System.out.println("CONGRATULATIONS YOU HAVE WON THE LOTTERY! Press 1 to buy a house, press 2 to buy a car.");
                int num3 = in.nextInt();
            if(num3 == 1)
            {
                System.out.println("You live a happy life with a spouse and children");
            }
            if(num3 == 2)
            {
                System.out.println("You crash the car and the insurance won't cover it, you go back to where you started.  ");
            }
            }
        }
    }

 

Revise this Paste

Your Name: Code Language: