package Test01;
import java.util.Scanner;
public class test04 {
public static void main(String[] args) {
int number=(int)(Math.random()*10+1);
System.out.println(“number”+number);
Scanner input=new Scanner(System.in);
int guee;
do {
System.out.println(“请输入一个介于1-10之间的数”);
guee=input.nextInt();
if (guee>number){
System.out.println(“太大了”);
}else if (guee<number){
System.out.println(“太小了”);
}
}while (guee!=number);
System.out.println(“恭喜你猜对了”);
}
}