import java.util.Scanner;
public class Student {
public static void main(String[] args) {
System.out.println("请输入三个数");
int num1=new Scanner(System.in).nextInt();
int num2=new Scanner(System.in).nextInt();
int num3=new Scanner(System.in).nextInt();
int num4;
if(num1>num2){
num4=num1;num1=num2;num2=num4;
}
if(num1>num3){
num4=num1;num1=num3;num3=num4;
}
if(num2>num3){
num4=num2;num2=num3;num3=num4;
}
System.out.println(num1+"<"+num2+"<"+num3);
}
}
原文:https://www.cnblogs.com/C33baby/p/12780805.html