import java.util.Scanner;public class Main { public static void main(String[] args) { int score1; int score2; Scanner scanner = new Scanner(System.in); System.out.println("输入上次考试成绩:"); score1 = scanner.nextInt(); System.out.println("输入这次考试成绩:"); score2 = scanner.nextInt(); float up = (float)(score2 - score1) / score1 * 100; System.out.printf("成绩提高了" + "%.2f%%" + "!",up ); }}
Sign in to make a reply
无名冷夜