import java.util.Random;
import java.util.Scanner;
public class Guess {
public static void main(String[] args) {
Random x = new Random();
int y = x.nextInt(100) + 1;
Scanner a = new Scanner(System.in);
System.out.println("是男人就一次猜中");
for (int i = 1; i < 6; i++) {
int i1 = a.nextInt();
if (i1 > y) {
System.out.println("大了,菜 比");
System.out.println("还敢猜不?");
while (i > 4) {
System.out.println("最后一次机会");
int i2 = a.nextInt();
if (i2 != y) {
System.out.println("比蔡徐坤还菜");
break;
}
}
} else if (i1 < y) {
System.out.println("小了,Low 比");
System.out.println("还敢猜不?");
while (i > 4) {
System.out.println("最后一次机会");
int i2 = a.nextInt();
if (i2 != y) {
System.out.println("比蔡徐坤还菜");
break;
} else {
System.out.println("虽然很菜,算你赢了");
break;
}
}
}
}
}
}
|
|