淘先锋技术网

首页 1 2 3 4 5 6 7
Scanner sc = new Scanner(System.in);
		Random random = new Random();
		int a = random.nextInt(100);
		while (true) {
			int b = sc.nextInt();
			if (a == b) {
				System.out.println("yes");
                                break;
			} else if (a > b) {
				System.out.println("太小了");
			} else if (a < b) {
				System.out.println("太大了");
			}
		}