admin 管理员组文章数量: 894082
Java(等级划分)
import java.util.Scanner;public class next {public static void main(String[] args){//声明部分int score;String level;Scanner sc = new Scanner(System.in);//输入部分System.out.print("score = ");score = sc.nextInt();//处理部分level = " ";if (score > 100){level = "超出范围";}else if (score >= 90){level = "优秀";}else if (score >= 80){level = "良好";}else if (score >= 70){level = "中等";}else if (score >= 60){level = "及格";}else if (score >= 0){level = "不及格";}else{level = "超出范围";}//输出部分System.out.print(level);} }
本文标签: Java(等级划分)
版权声明:本文标题:Java(等级划分) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.freenas.com.cn/jishu/1687603239h120044.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论