import java.util.Random;
import java.util.Scanner;

public class caishuzi {
    public static void main(String[] args){
        Random random = new Random();
        int math = random.nextInt(100);
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 10; i++) {
            int a = scanner.nextInt();
            if(a == math){
                System.out.println("恭喜答对啦!");
                return;
            }else {
                if(a>math){
                    System.out.println("猜大了");
                }else {
                    System.out.println("猜小了");
                }
            }
        }
    }
}

  

posted on 2023-08-22 15:51  村边大麦地  阅读(3)  评论(0编辑  收藏  举报