编程题:11
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
double x = scanner.nextDouble();
double y;
if (x <= 15) {
y = 4 * x / 3;
} else {
y = 2.5 * x - 17.5;
}
System.out.printf("%.2f", y);
}
}

posted on 2025-05-12 23:21  Swishy  阅读(5)  评论(0)    收藏  举报