Scanner scanner = new Scanner(System.in);
System.out.print("Input your first score: ");
int FirstScore = scanner.nextInt();
System.out.print("Input your second score: ");
int SecondScore = scanner.nextInt();
float result = (float)(SecondScore-FirstScore)/FirstScore*100;
System.out.printf("你的成绩提升了:%.2f %%",result);
Ashen One
Scanner scanner = new Scanner(System.in);
System.out.print("Input your first score: ");
int FirstScore = scanner.nextInt();
System.out.print("Input your second score: ");
int SecondScore = scanner.nextInt();
float result = (float)(SecondScore-FirstScore)/FirstScore*100;
System.out.printf("你的成绩提升了:%.2f %%",result);