Assignment 39 and Little Quiz
Code
/// Name: Matthew Hughs
/// Period: 5
/// Program Name: Little Quiz
/// File LittleQuiz.java
/// Date Finished: 10/29/2015
import java.util.Scanner;
public class LittleQuiz
{
public static void main(String [] args)
{
Scanner keyboard = new Scanner(System.in);
String response;
int questionOne, questionTwo, questionThree, score;
score = 0;
System.out.print("Quizzzzzzzzzzzzzzzz time!!!!!? Press 1 to start ");
response = keyboard.next();
System.out.print("LET'S GOOOOOOOOOOOOOOOO!");
System.out.println("Q1) What is your favorite meme?");
System.out.print(" 1) pepe");
System.out.print(" 2) Good Guy Greg");
System.out.print(" 3) Bad Luck Bryan");
System.out.println();
questionOne = keyboard.nextInt();
System.out.println();
if (questionOne == 1)
{
System.out.print("That is correct!");
score = score + 1 ;
}
else
{
System.out.print("You are so dumb, the obvious awnser is pepe!");
}
System.out.println();
System.out.println("Q2) Do you know how to make memes?");
System.out.print(" 1) Yes");
System.out.print(" 2) No");
System.out.println();
questionTwo = keyboard.nextInt();
System.out.println();
if (questionTwo == 1)
{
System.out.print("That is correct!");
score =score + 1 ;
}
else
{
System.out.print("Of course you do, Memes are from the heart.");
}
System.out.println();
System.out.println("Q3) What year is it right now?");
System.out.print(" 1) 1990");
System.out.print(" 2) 2015");
System.out.print(" 3) 1995");
System.out.println();
questionThree = keyboard.nextInt();
System.out.println();
if (questionThree == 2)
{
System.out.print("That is correct!");
score = score + 1 ;
}
else
{
System.out.print("You're not a 90s kid, so get out of here!");
}
System.out.println();
System.out.println("Overall you got " + score + " out of 3 correct, Well Memed.");
}
}
Picture of the output