Discuss / Java / 1

你是微笑

#1 Created at ... [Delete] [Delete and Lock User]
import java.util.Scanner;public class Main {    public static void main(String[] args) {        Scanner scanner = new Scanner (System.in);        System.out.print("Input last test score:");        int s1 = scanner.nextInt();        System.out.print("Input this test score:");        int s2 = scanner.nextInt();        double result = ( s2 - s1 ) * 100.00 / s1 ;        System.out.println(result);        System.out.printf("Your score improved %.2f %%\n", result);    }}

  • 1

Reply