Assignment #60 and Fifty-Seventh Program

Code

        /// Name: Georgi Atanasov
        /// Period: 5
        /// Program Name: The Worst Number-Guessing Game Ever!
        /// File Name: NumberGuessing.java
        /// Date Finished: 12/3/2015
    
    import java.util.Scanner;

    public class NumberGuessing
    {
        public static void main(String[] args)
        {
            Scanner keyboard = new Scanner(System.in);
            
            int secretNumber = 2;
            int guess;
            
            System.out.println("Would you like to play a game?... I don't care!");
            System.out.println();
            
            System.out.println("Try to guess a number between 1 and 10. C'mon guess! ");
            guess = keyboard.nextInt();
            
            System.out.println();
            
            if (guess == secretNumber)
                System.out.println("Wow! You are pro because I was thinking of " + secretNumber + "!");
            else
                System.out.println("Wrong! The number I was thinking of was " + secretNumber + "!");
        }
    }
    
    

Picture of the output

Assignment 64