把他写进 while
------解决方案-------------------- import java.util.*; public class Randoms { public static void main(String [] args) { Scanner input = new Scanner(System.in); System.out.println("请输入一个1-100的整数"); int random = (int)(Math.random()*100); int num = 0; while(num != random) {