标签:
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String []args){ Scanner sc=new Scanner(System.in); int a[]=new int[3]; int b[]=new int[3]; int c=a.length;; for(int i=0;i<3;i++){ a[i]=sc.nextInt(); } Arrays.sort(a); for(int i=0;i<a.length;i++){ c--; b[i]=a[c]; } for(int i:b) { System.out.print(i+" "); } System.out.println(); } }
标签:
原文地址:http://www.cnblogs.com/watchfree/p/5326385.html