参考代码:
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); int c = scan.nextInt(); int min = Math.min(a, b); min = Math.min(c, min); int max = Math.max(a, b); max = Math.max(max, c); int mid = (a+b+c) - min - max; System.out.print(min + " " + mid + " " + max); } }
0.0分
0 人评分