package cn.wzt;import java.util.Random;import java.util.Scanner;public class Csyx { public static void main(String[] args) { Random random = new Random(); Scanner scanner = new Scanner(System.in); int sj= random.nextInt(100)+1; int i=0; while (true){ if(i>9){ System.out.println("你的次数已用光,成绩0分"); break; } System.out.println("请输入1-100数值:"); if (!scanner.hasNextInt()){ if(scanner.nextLine().equals("exit")){ System.out.println("已成功退出游戏"); break; }else { System.out.println("输入错误,请输入数值"); continue; } } int cs= scanner.nextInt(); if(cs>sj){ System.out.println("猜大了"); ++i; continue; }else{ if (cs
package cn.wzt;import java.util.HashSet;import java.util.Random;import java.util.Set;public class Ssq { public static void main(String[] args) { Random random = new Random(); int blue= random.nextInt(16)+1; Set