import java.util.Scanner;
class scannertext
{
public static void main(String[] args)
{
Scanner text = new Scanner(System.in);
fraction fs = new fraction();
System.out.println("请输入一个分数(1--100)");
int Score = text.nextInt();//键盘输入用
fs.mark(Score);
}
}
class fraction
{
public static void mark(int Score)
{
if(Score<=100 & Score>=90)
{
System.out.println("A等");
}
else if(Score<=89 & Score>=80)
{
System.out.println("B等");
}
else if(Score<=79 & Score>=70)
{
System.out.println("C等");
}
else if(Score<=69 & Score>=60)
{
System.out.println("C等");
}
else
{
System.out.println("E等");
}
}
} |