package struct; import java.util.Scanner; public class IfDemo1 { public static void main(String[] args) { //请输入成绩 Scanner scanner = new Scanner(System.in); System.out.println("请输入成绩"); int score = scanner.nextInt(); if(score>60){ System.out.println("及格"); }else { System.out.println("不及格"); } scanner.close(); } }
IF选择结构求成绩合格与否
最新推荐文章于 2024-11-12 21:14:07 发布