LittleQuiz
Code
import java.util.Scanner;
public class LittleQuiz
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int a1, a2, a3;
System.out.println( "How to eat a cake? " );
System.out.println( " 1) fork " );
System.out.println( " 2) dog " );
System.out.println( " 3) lasers " );
a1 = keyboard.nextInt();
if ( a1 == 1 )
{
System.out.println( "idk" );
}
else if ( a1 == 2 )
{
System.out.println( "what?");
}
else if (a1 == 3 )
{
System.out.println( "YOU GOT A POINT THERE" );
}
System.out.println(" ");
System.out.println( " What does a plane do? " );
System.out.println( " 1) explode " );
System.out.println( " 2) fall " );
System.out.println( " 3) nope " );
a2 = keyboard.nextInt();
if ( a2 == 1 )
{
System.out.println( " YOU CRAZY " );
}
else if ( a2 == 2 )
{
System.out.println( " WELL YOUR NOT WRONG " );
}
else if (a2 == 3 )
{
System.out.println( " DID YOU REALLY CHOOSE THIS " );
}
System.out.println(" ");
System.out.println( " What does a bird say? " );
System.out.println( " 1) WOOF " );
System.out.println( " 2) GOT SOME CRYSTAL " );
System.out.println( " 3) OG MILK " );
a3 = keyboard.nextInt();
if ( a3 == 1 )
{
System.out.println( " OOOKAY? " );
}
else if ( a3 == 2 )
{
System.out.println( " YOU NEED TO SEE A DOC " );
}
else if (a3 == 3 )
{
System.out.println( " MOST REASONABLE " );
}
if (( a1 == 1 && a2 == 1 && a3 == 1 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 1 && a2 == 1 && a3 == 2 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 1 && a2 == 1 && a3 == 3 ))
{
System.out.println( " you got 2 out of 3" );
}
else if (( a1 == 1 && a2 == 2 && a3 == 1 ))
{
System.out.println( " you got 2 out of 3" );
}
else if (( a1 == 1 && a2 == 2 && a3 == 2 ))
{
System.out.println( " you got 2 out of 3" );
}
else if (( a1 == 1 && a2 == 2 && a3 == 3 ))
{
System.out.println( " you got 3 out of 3" );
}
else if (( a1 == 1 && a2 == 3 && a3 == 1 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 1 && a2 == 3 && a3 == 2 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 1 && a2 == 3 && a3 == 3 ))
{
System.out.println( " you got 2 out of 3" );
}
else if (( a1 == 2 && a2 == 1 && a3 == 2 ))
{
System.out.println( " you got 0 out of 3" );
}
else if (( a1 == 2 && a2 == 1 && a3 == 3 ))
{
System.out.println( " you got 0 out of 3" );
}
else if (( a1 == 2 && a2 == 2 && a3 == 1 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 2 && a2 == 2 && a3 == 2 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 2 && a2 == 2 && a3 == 3 ))
{
System.out.println( " you got 2 out of 3" );
}
else if (( a1 == 2 && a2 == 3 && a3 == 1 ))
{
System.out.println( " you got 0 out of 3" );
}
else if (( a1 == 2 && a2 == 3 && a3 == 2 ))
{
System.out.println( " you got 0 out of 3" );
}
else if (( a1 == 2 && a2 == 3 && a3 == 3 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 3 && a2 == 1 && a3 == 2 ))
{
System.out.println( " you got 0 out of 3" );
}
else if (( a1 == 3 && a2 == 1 && a3 == 3 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 3 && a2 == 2 && a3 == 1 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 3 && a2 == 2 && a3 == 2 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 3 && a2 == 2 && a3 == 3 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 3 && a2 == 3 && a3 == 1 ))
{
System.out.println( " you got 0 out of 3" );
}
else if (( a1 == 1 && a2 == 3 && a3 == 2 ))
{
System.out.println( " you got 1 out of 3" );
}
else if (( a1 == 1 && a2 == 3 && a3 == 3 ))
{
System.out.println( " you got 1 out of 3" );
}
}
}
LittleQuiz