package cn.wan;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("game beginning, input the number you guess:");
while (true) {
System.out.println("play again, input the number you guess:");
Random random = new Random(new Date().getTime());
int trueValue = random.nextInt(10);
int guessValue;
while ((guessValue = sc.nextInt()) != trueValue) {
if (guessValue > trueValue) {
System.out.println(guessValue + " is bigger");
} else {
System.out.println(guessValue + " is smaller");
}
}
System.out.println(guessValue + " is right");
}
}
}