Assignemnt #39 and A Little Quiz Code /// Name: Yordan Rashkov /// Period: 7 /// Program Name: ALittleQuiz /// File Name: ALittleQuiz.java /// Date Finished: 11/6/2015 import java.util.Scanner; public class ALittleQuiz { public static void main( String[] args ) { Scanner keyboard = new Scanner(System.in); int Q1, Q2, Q3; System.out.println(); System.out.println(); System.out.println(); System.out.println( "Are you ready to take a little quiz?" ); System.out.println(); System.out.println( " I'll take that as a yes... let's begin! " ); System.out.println(); System.out.println( " Q1 : What does the liters badge on a car signify? " ); System.out.println(); System.out.println( " 1. Engine's Displacement " ); System.out.println( " 2. Thickness of the vehicle's tires " ); System.out.println( " 3. Horsepower " ); Q1 = keyboard.nextInt(); if ( Q1 == 1 ) { System.out.println( " CORRECT! " ); } else if ( Q1 == 2 ) { System.out.println( " WRONG! " ); } else if ( Q1 == 3 ) { System.out.println( " WRONG! " ); } System.out.println(); System.out.println(); System.out.println(); System.out.println( " Anyways...Last Question!" ); System.out.println(); System.out.println( " Q3 : How much HORSEPOWER...is too much HORSEPOWER? " ); System.out.println(); System.out.println( " 1. 150 HORSEPOWER! " ); System.out.println( " 2. 550 HORSEPOWER! " ); System.out.println( " 3. NO SPECIFIC NUMBER...THERE'S NEVER ENOUGH HORSEPOWER! " ); Q2 = keyboard.nextInt(); if ( Q2 == 3 ) { System.out.println( " CORRECT! " ); } else if ( Q1 == 2 ) { System.out.println( " WRONG! " ); } else if ( Q1 == 1 ) { System.out.println( " WRONG! " ); } System.out.println(); System.out.println(); System.out.println(); System.out.println( " Anyways...Next Question!" ); System.out.println(); System.out.println( " Q3 : What is the brand of the only rally-based car in the whole world with an H-Formated engine type? " ); System.out.println(); System.out.println( " 1. TOYOTA " ); System.out.println( " 2. MITSUBISHI " ); System.out.println( " 3. SUBARU " ); Q3 = keyboard.nextInt(); if ( Q3 == 3 ) { System.out.println( " CORRECT! " ); } else if ( Q3 == 2 ) { System.out.println( " WRONG! " ); } else if ( Q3 == 1 ) { System.out.println( " WRONG! " ); } System.out.println(); System.out.println(); System.out.println(); System.out.println( "THANK YOU FOR PLAYING!" ); } }