import java.util.Scanner;
class 猜猜 {
public static void main(String[] args) {
Scanner in =new Scanner(System.in);
int a = getSJS();
int max =100 ;
int min = 0;
while(true){
System.out.println("你猜");
int b = in.nextInt();
if(a == b ){
System.out.print("游戏结束");
break;
}else if(b > a){
max = b;
System.out.println("大了 数字在 "+ min +" 和 " + max + "之间");
}else{
min = b;
System.out.println("小了数字在 "+ min +" 和 " + max + "之间");
}
}
}
}
{:5_273:} |
|