Assignemnt #39 and ALittleQuiz

Code

  /// name: Leila Ordukhani
  /// period: 6
  /// program name: Twenty-Eighth Program
  /// file name: ALittleQuiz.java
  /// date finished: 10/16/15
    
    import java.util.Scanner;

    public class ALittleQuiz
    {
    
        public static void main(String[] args)
        {
        
        Scanner keyboard = new Scanner(System.in);
        
        String begin;
        int answerA, answerB, answerC, score;
        score = 0;
        
        System.out.println("Ready for the quiz?");
        begin = keyboard.next();
        
        System.out.println("Here it comes");
        System.out.println();
        
        System.out.println("Q1. How many states are in the USA?");
        System.out.println("      1. 13");
        System.out.println("      2. 60");
        System.out.println("      3. 50");
        System.out.println();
        answerA = keyboard.nextInt();
        
        if (answerA == 3)
        {
        System.out.println("Correct. Good work.");
            score ++;
        }
        else
        {
        System.out.println("Incorrect.");
        }
        
        System.out.println("Q2. Tehran is the capital of which country?");
        System.out.println("      1. Iran");
        System.out.println("      2. Iraq");
        System.out.println("      3. Brazil");
        System.out.println();
        answerB = keyboard.nextInt();
        
        if (answerB == 1)
        {
        System.out.println("Correct. Good work.");
            score ++;
        }
        else
        {
        System.out.println("Incorrect.");
        }
        
        System.out.println("Q3. What is the squre root of 49?");
        System.out.println("      1. 10");
        System.out.println("      2. 9");
        System.out.println("      3. 7");
        System.out.println();
        answerC = keyboard.nextInt();
        
        if (answerC == 3)
        {
        System.out.println("Correct. Good work.");
            score ++;
        }
        else
        {
        System.out.println("Incorrect.");
        }
        
                
        System.out.println();
        System.out.println();
        System.out.println("Your total was " + score + " of 3 correct.");
        System.out.println("Thank you for playing!");
        }
        }
       

Picture of the output

Assignment 39