package Chapter3;
import java.util.Scanner;
public class Code8 {
public static void main(String[] args) {
System.out.println("Enter three intagers:");
Scanner input = new Scanner(System.in);
int one = input.nextInt();
int two = input.nextInt();
int three = input.nextInt();
int temp= 0;
if(one > two) {
temp = one;
one = two;
two = temp;
}
if(one > three) {
temp = one;
one = three;
two = temp;
}
if(two > three) {
temp = two;
two = three;
three = temp;
}
System.out.println(one + "<" + two + "<" + three);
}
}
输出
Enter three intagers: 5 7 6 5<6<7