Assignemnt #38

Code

                      /// Name: Holden Ganch
                      /// Period: 7
                      /// Program Name: Thirty nineth Program
                      /// File Name: Space.java
                      /// Date Finished: 10/28/2015
            
                      import java.util.Scanner;

             class Quiz{
            
                public static void main(String[] args) {
                
                    Scanner keyboard = new Scanner(System.in);
                
                    String quiz;
                    int Q1,Q2,Q3;
                    
                    
                    System.out.print("Are you ready for a quiz? ");
                    quiz = keyboard.next();
                    
                    System.out.println("Okay, get ready to fail!");
                    
                    System.out.println("Q1) What is my name?");
                    System.out.println("     1) Michealllly");
                    System.out.println("     2) Holden");
                    System.out.println("     3) Fredwin12");
                    
                    System.out.print("> ");
                    Q1 = keyboard.nextInt();
                    
                    if ( Q1 == 2 )
                    {
                    System.out.println("Woaw nice lucky guess! your right.");
                    }
                    else 
                    {
                    System.out.println("Sorry, Your wrong And clearly know nothing");
                    }
                    
                    System.out.println("Q2) How do you spell 8");
                    System.out.println("    1) Eght");
                    System.out.println("    2) Ayet ");
                    System.out.println("    3) Eight");
                    
                    System.out.print("> ");
                    Q2 = keyboard.nextInt();
                    
                    if ( Q2 == 3 )
                    {
                    System.out.println("Congrats you can spell at a first grade level!");
                    }
                    else 
                    {
                    System.out.println("Oh, man you need help");
                    }
                    
                    System.out.println("Q2) Who is the best actor?");
                    System.out.println("    1) Obama");
                    System.out.println("    2) Morgan Freeman ");
                    System.out.println("    3) A bush");
                    
                    System.out.print("> ");
                    Q3 = keyboard.nextInt();
                    
                    if ( Q3 == 2 )
                    {
                    System.out.println("You are correct and may live");
                    }
                    else 
                    {
                    System.out.println("Omg! really? just kill yourself");
                    }
                    
                    
                    if ( Q1 == 1 && Q2 == 2 && Q3 == 2 )
                    {
                        System.out.println("Congrats on the 100% keep up the dog work.");
                 
                    }
                    else if ( Q1 == 1 && Q2 == 2)
                    {
                        System.out.println("Not to shabby. 66%");
                    }
                    else if ( Q1 == 1 && Q3 == 2 )
                    {
                        System.out.println("Not to shabby. 66%");
                    }
                     else if ( Q2 == 2 && Q3 == 2 )
                    {
                        System.out.println("Not to shabby. 66%");
                    }   
                    else if ( Q1 == 1 )
                    {
                        System.out.println("Yikes you did not do welll, a sad 1 out of 3");
                    }
                    else if (  Q2 == 2 )
                    {
                        System.out.println("Yikes you did not do welll, a sad 1 out of 3");
                    }
                    else if (   Q3 == 2 )
                    {
                        System.out.println("Yikes you did not do welll, a sad 1 out of 3");
                    }
                     else 
                    {
                        System.out.println("0 out of 3...... really? You must have been trying to fail.-_-");
                     }
                    
            	    }
             
                }

     
        
        
        
        
        
                           


    

Picture of the output

Assignment 39