@@ -0,0 +1,1727 @@
+import java.util.Scanner; %0Aimport java.util.Random;%0A%0Apublic class MagicNumber %7B%0A%0A      /**%0A      * @param args%0A      */%0A      public static void main(String%5B%5D args) %7B%0A            // TODO Auto-generated method stub%0A      Random rand = new Random();%0A      int guess_number = rand.nextInt(1000);%0A      Scanner user_in = new Scanner(System.in);%0A      %0A      //prompt%0A      System.out.println(%22Guess a number from 0 - 1,000%22);%0A      int answer = user_in.nextInt();%0A      int total_guess = 0;%0A      user_in.nextLine();%0A      ++total_guess;%0A      %0A      //correct answer checker. notice we are incrementing the # of guesses%0A      if (answer == guess_number)%7B%0A            ++total_guess;%0A            System.out.println(%22Correct!!! You guessed: %22 +total_guess+%22 times.%22);%0A            %0A      %7D%0A      %0A      //is the user getting hotter or colder%0A      while (answer != guess_number)%7B%0A            ++total_guess;%0A      if (answer %3E guess_number)%7B%0A            System.out.println(%22Sorry, but your answer: %22+answer+%22 was too high.%22);%0A            System.out.println(%22Please guess again.%22);%0A            answer = user_in.nextInt();%0A            user_in.nextLine();%0A            if (answer == guess_number)%7B%0A                  System.out.println(%22Correct!!! You guessed: %22+total_guess+%22 times.%22);%0A            %7D%0A      %7D%0A      else if (answer %3C guess_number)%7B%0A            System.out.println(%22Sorry, but your answer: %22+answer+%22 was too low.%22);%0A            System.out.println(%22Please guess again.%22);%0A            answer = user_in.nextInt();%0A            user_in.nextLine();%0A            if (answer == guess_number)%7B%0A                  System.out.println(%22Correct!!! You guessed: %22+total_guess+%22 times.%22);%0A            %7D%0A      %7D%0A      %7D%0A      %7D%0A            %7D%0A%0A

Create MagicNumber.java