📄 guess3.java
字号:
class Guess3 {
public static void main(String args[])
throws java.io.IOException {
int i;
char num ='6';
System.out.println("a number between 0 and 10.");
System.out.print("what is it: ");
i = System.in.read();
// 从键盘上输入一个数字
if(i==num) System.out.println("you are talent");
else {
System.out.print("You are wrong ");
if(i<num) System.out.println("The number you guess is low.");
else System.out.println("The number you guess is high.");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -