import java.util.Scanner;
public class Liao {
public static void main(String[] args) {
int intScore;//总评
int generalScore;//平时分
Scanner sc = new Scanner(System.in);
while (true){
System.out.println("请输入你的平时分:");
generalScore = sc.nextInt();
System.out.println("请输入你的期望分数:");
intScore = sc.nextInt();
//判断平时分
if (generalScore >= 0 && generalScore <= 40){
//判断期望分数
if (intScore >= 0 && intScore <= 100){
System.out.println("期末考所需分数:" + (intScore - generalScore) / 0.6);
}
}
}
}
}
期末所需分数
最新推荐文章于 2025-05-09 17:11:59 发布