public static void main(String[] args) { Scanner stdIn = new Scanner(System.in);
System.out.print("整数a:"); int a = stdIn.nextInt(); System.out.print("整数b:"); int b = stdIn.nextInt(); System.out.print("整数c:"); int c = stdIn.nextInt();
int mid = a; if (a > b) { if (b > c) mid = b; else if (c < a) mid = c; } else { if (a > c) mid = a; else if (c > b) mid = b; else mid = c; }