?? testexcise0211.java
字號:
import java.io.*;
class Excise0211{
int score;
public void set(int s){
score=s;
}
public String gradels(){
if (score<60)
return "不合格";
else if (score>=60 && score<90)
return "合格";
else return "優(yōu)秀";
}
}
public class TestExcise0211{
public static void main(String[] args){
Reader ir = new InputStreamReader(System.in);
BufferedReader r = new BufferedReader(ir);
String sc="";
int intA=0;
try{
sc = r.readLine();
}catch (IOException e){}
try{
intA=Integer.parseInt(sc);
}catch (NumberFormatException e){
System.out.println("輸入的數(shù)據(jù)不是整數(shù)");
}
Excise0211 b = new Excise0211();
b.set(intA);
System.out.println(b.gradels());
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -