Assignemnt #47
Code
///colin hinton
///5th period
///More Questions
///MoreQuestions.java
///10/15/2015
import java.util.Scanner;
class MoreQuestions
{
public static void main (String [] args)
{
Scanner keyboard = new Scanner(System.in);
int questOne, questTwo, ansFin ;
System.out.print(" Hey ya'll ima try and guess of what you are thinking but first give me a hand.");
System.out.print(" Does it stay (1)inside, (2)outside, or (3)both? ");
questOne = keyboard.nextInt();
System.out.print("Is it alive? (10)yes, (20)no?" );
questTwo = keyboard.nextInt();
ansFin = questOne + questTwo;
if (ansFin == 11)
{
System.out.print("You are a houseplant.");
}
if (ansFin == 12)
{
System.out.print("You are a bison.");
}
if (ansFin == 13)
{
System.out.print("You are a dog.");
}
if (ansFin == 21)
{
System.out.print("You are a shower curtain.");
}
if (ansFin == 22)
{
System.out.print("you are a billboard.");
}
if (ansFin == 23)
{
System.out.print(" you are a cell phone.");
}
}
}
Picture of the output