Assignment #47 Two More Questions
Code
///Name: Ian Grant
///Period:5
///Project Name: Two More Questions
///File Name:TwoMoarQues.java
///10/29/15
import java.util.Scanner;
public class TwoMoarQues
{
public static void main(String[] args)
{
String q,w;
Scanner stuff =new Scanner(System.in);
System.out.println("TWO QUESTIONS!!");
System.out.println("Think of an object, and I'll try to guess it.");
System.out.println("Questions 1: Is it stay inside or outside or both?");
q=stuff.next();
System.out.println();
System.out.println("Question 2: Is it a living thing?");
w=stuff.next();
if ((q.equals("inside"))&&(w.equals("yes")))
{
System.out.println("Could it be the rare man-eating houseplant?");
}
if (q.equals("inside")&& w.equals("no"))
{
System.out.println("Could it be the rare man-eating breadbox?");
}
if ((q.equals("outside"))&&(w.equals("yes")))
{
System.out.println("Could it be the rare man-eating squrriel, named Ruffus?");
}
if ((q.equals("outside"))&&(w.equals("no")))
{
System.out.println("Could it be the rare talking rock, named Regis?");
}
if ((q.equals("both"))&&(w.equals("yes")))
{
System.out.println("A human named, Colin?");
}
if ((q.equals("both"))&&(w.equals("no")))
{
System.out.println("Could it be the rare man-eating pepe?");
}
}
}
Output