|
- package aiyu.day05;
- import java.util.Scanner;
- public class Dome_4 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- System.out.println("请输入一个整数数值:");
- int a = sc.nextInt();
- int c = js(a);
- }
- public static int js(int a) {
- if (a >= 90 && a <= 100) {
- System.out.println('A');
- } else if (a >= 80 && a < 90) {
- System.out.println('B');
- } else if (a >= 70 && a < 80) {
- System.out.println('C');
- } else if (a >= 60 && a < 70) {
- System.out.println('D');
- } else if (a >= 0 && a < 60) {
- System.out.println('E');
- } else {
- System.out.println('F');
- }
- return a;
- }
- }
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|