class NumberGuess {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("请输入要猜的数字");
int numberguess = sc.nextInt();
int x = 0;
while(x <= numberguess) {
if (x == numberguess) {
System.out.println("该数字是" + x);
}
x++;
}
}
} |
|