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

📄 ifexam.java

📁 java的一些小型程序代码
💻 JAVA
字号:
/*
 * Created on 2007/03/23
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
import java.io.*;
/**
 * @author BFJ1
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ifexam {

	public static void main(String[] args) throws IOException {
		int examscore = 0;
		try
		{
			System.out.println("Input your examscore:");
			BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
			examscore=Integer.parseInt(in.readLine());
		}
		catch(Exception e)
		{
			System.out.println("Input Error!");
		}
		if (examscore>=0&&examscore<=100)
		{
			System.out.print(examscore);
			if (examscore<60)
				System.out.println("- Bad score.");
			else if(examscore>=60&&examscore<80)
				System.out.println("- Just so so.");
			else
				System.out.println("- Good score.");	
		}
		else 
		{
			System.out.println("examscore is invalid.");
		}	
	}
}

⌨️ 快捷键说明

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