import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float lasttest = scanner.nextInt();
float thistest = scanner.nextInt();
float tigao = (thistest - lasttest) / lasttest * 100;
System.out.printf("%.2f%%",tigao);
}
Sign in to make a reply
明明love0
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float lasttest = scanner.nextInt();
float thistest = scanner.nextInt();
float tigao = (thistest - lasttest) / lasttest * 100;
System.out.printf("%.2f%%",tigao);
}
}