import java.util.Scanner;
public class XB_2_10_maopao {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
int[] arr = new int[3];
//定义3个数组
System.out.print("请输入x的值");
arr[0] = input.nextInt();
System.out.print("请输入y的值");
arr[1] = input.nextInt();
System.out.print("请输入z的值");
arr[2] = input.nextInt();
for (int i = 0;i<arr.length;i++){
for (int a=0;a<arr.length;a++){
if (arr[i]<arr[a]){
int arr1[]={0};
arr1[0]=arr[i];
arr[i]=arr[a];
arr[a]=arr1[0];
}
}
}
for (int i=0;i<arr.length;i++){
System.out.print(arr[i]);
}
}
}
没有回复内容