package com.itheima.test; import java.util.Scanner; public class Test6 { public static void main(String[] args){ Scanner sc=new Scanner(System.in); System.out.println("请输入内容"); int score=sc.nextInt(); if (score>0 &&score<=100){ if(score>=95){ System.out.println("buy car"); }else if (score>=90&&score<=94) { System.out.println("play one day"); } else if (score>=80 &&score<=89) { System.out.println("buy jingang"); }else { System.out.println("bit it"); } }else { System.out.println("错误输入"); } } }
java if分数不同奖励不同
最新推荐文章于 2024-09-29 08:33:21 发布