⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testexcise0211.java

📁 我在学习JAVA的讲义
💻 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 "优秀";
	}
	}


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("输入的数据不是整数");
		}
		Excise0211 b = new Excise0211();
		b.set(intA);	
		System.out.println(b.gradels());
		
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -