import java.util.Scanner;
public class A{
public static void main(String[] args) {
int ran=(int)(Math.random()*100);
System.out.println(ran);
Scanner input=new Scanner(System.in);
int x=input.nextInt();
while(x!=ran){
if(x>ran){
System.out.println("你猜的过大");
System.out.println("请继续猜");
x=input.nextInt();
continue;
}
else{
System.out.println("你猜的过小");
System.out.print("请继续猜");
x=input.nextInt();
continue;
}
}
System.out.println("恭喜你,猜对了!");
}
}
07-04
1447
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)