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

📄 switchexam.java

📁 java的一些小型程序代码
💻 JAVA
字号:
import java.io.BufferedReader;
import java.io.InputStreamReader;

/*
 * Created on 2007/03/23
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author BFJ1
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Switchexam {

	public static void main(String[] args) {
		int exam = 0;
		try
		{
			System.out.println("Input your examscore:");
			BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
			exam=Integer.parseInt(in.readLine());
		}
		catch(Exception e)
		{
			System.out.println("Input Error!");
		}
		switch(exam/10)
		{
			case 6:
				System.out.println("You score is in:60~70");
			case 7:
				System.out.println("You score is in:70~80");
			case 8:
				System.out.println("You score is in:80~90");
			case 9:
			case 10:
				System.out.println("You score is in:90~100");
			case 0:
			case 1:
		    case 2:
		    case 3:
		    case 4:
		    case 5:
		    	System.out.println("You score is in:0~59");
			default:
				System.out.println("You score is invalid.");
		}
	}
}

⌨️ 快捷键说明

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