package com.task020201;
import java.util.Scanner;
public class Demo6 {
/**
* @param args
*/
public static void main(String[] args) {
int x, y, z, t = 0;
Scanner in = new Scanner(System.in);
System.out.println("请输入x的值");
x = in.nextInt();
System.out.println("请输入y的值");
y = in.nextInt();
System.out.println("请输入z的值");
z = in.nextInt();
System.out.println("交换前数" + x + "," + y + "," + z);
if (x > y) {
t = x;
x = y;
y = t;
}
if (x > z) {
t = x;
x = z;
z = t;
}
if (y > z) {
t=y;
y=z;
z=t;
}
System.out.println("交换后的数" + x + "," + y + "," + z);
}
}