@@ -0,0 +1,537 @@
+import java.util.Scanner;%0A%0Apublic class guess_user_number %7B%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Scanner scan = new Scanner(System.in);%0A%0A%09%09int min=1,max=101;%0A%09%09boolean found=false;%0A%0A%09%09while (!found) %7B%0A%09%09%09int mid = (max-min)/2+min;%0A%09%09%09System.out.print(mid + %22? %3E%3E%3E %22);%0A%09%09%09String response = scan.nextLine().toUpperCase();%0A%09%09%09if (response.equals(%22Y%22)) %7B%0A%09%09%09%09System.out.println(%22Found it: %22+mid);%0A%09%09%09%09found = true;%0A%09%09%09%7D else if (response.equals(%22L%22)) %7B%0A%09%09%09%09min = mid;%0A%09%09%09%7D else if (response.equals(%22H%22)) %7B%0A%09%09%09%09max = mid;%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D

guess user number: java