标签:一个 stat [] main next span if_else class 范围
import java.util.Scanner; public class Dome1{ public static void main (String []args){ Scanner input = new Scanner (System.in ); int a,b,c,d; float e; System.out.print("请输入第一个数:"); a= input.nextInt(); System.out.print("请输入第二个数:"); b= input.nextInt(); System.out.print("请输入第三个数:"); c= input.nextInt(); d=a+b+c; e=d/3; if(e>100||e<0){ System.out.print("不在范围内"); } else{ if(e>=90&&e<=100){ System.out.print("甲"); } else if(e>=80&&e<=90){ System.out.print("乙"); } else if(e>=70&&e<=80){ System.out.print("丙"); }else if(e>=60&&e<=70){ System.out.print("丁"); } else{ System.out.print("不合格"); } } } }
标签:一个 stat [] main next span if_else class 范围
原文地址:https://www.cnblogs.com/jingcaibin/p/9398616.html