System.out.print("上次成绩:");int lastScore = scanner.nextInt();System.out.print("本次成绩:");int Score = scanner.nextInt();double percent = (double)(Score-lastScore)/lastScore*100;System.out.printf("百分比为:%.2f%%\n",percent);
Sign in to make a reply
lookphp