📄 testtabledrive2.java
字号:
import com.kettas.common.*;
public class TestTableDrive2{
static int[] levelScore = { 0, 60, 70, 80, 90};
static char[] levelChar = {'E', 'D', 'C', 'B', 'A'};
public static void main(String args[]){
int n = SystemIn.readInt();
int levelIndex = 0;
//根据n的不同,得到相应的数组下标
while( (levelIndex!=5) || ( n > levelScore[levelIndex] ) )
levelIndex++;
System.out.println( levelChar[levelIndex - 1] );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -