📄 guess.java~4~
字号:
import java.util.Random;
import java.io.*;
import java.io.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2007</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class Guess {
public Guess() {
}
public static void main(String[] args) {
Guess guess1 = new Guess();
Random rand=new Random();
int guessNum= Math.abs(rand.nextInt()%20);
for(int i=0;i<5;i++){
System.out.println("请输入数字!");
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int tempInt = Integer.parseInt( (String) in.readLine());
}
catch (Exception ex) {
System.out.println("输入错误!");
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -