import java.util.Scanner;
class Test1_Math {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = (int)(Math.random() * 100) + 1;
while (true) {
int b = sc.nextInt();
if (b > a) {
System.out.println("大了");
}else if (b < a) {
System.out.println("小了");
}else {
System.out.println("中了");
break;
}
}
}
}
|
|