代码拉取完成,页面将自动刷新
import java.util.Random;
import java.util.Scanner;
public class shiyan1 {
public static void main(String[] args) {
Random rd = new Random();
int a = rd.nextInt(20165225);
System.out.println("丞哥说猜数字只能猜0到20165225哦");
Scanner input = new Scanner(System.in);
while (true) {
try {
int b = input.nextInt();
if (b == a) {
System.out.println("天官赐福,百无禁忌!");
break;
} else if (b < a&&b > 0) {
System.out.println("QAQ小了啦");
} else if (b > a&&b < 20165225) {
System.out.println("QAQ大了啦");
}
else System.out.println("丞哥说看了题目还故意打错的都是耍流氓!");
}catch (Exception e) {
System.out.println("大兄弟你在干啥???");
break;
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。