public class Test_16 {
System.out.println("请输入a的值:");
int a = input.nextInt();
System.out.println("请输入b的值:");
int b = input.nextInt();
System.out.println("请输入c的值:");
int c = input.nextInt();
//判断
int temp;
if (a>b) {
temp = a;
a = b;
b = temp;
}
if (b>c) {
temp = c;
c = b;
b = temp;
}
if (a>b) {
temp = a;
a = b;
b = temp;
}
System.out.println(a+","+b+","+c);
}
}
public static void main(String[] args) {
Scanner input = new Scanner(System.in);System.out.println("请输入a的值:");
int a = input.nextInt();
System.out.println("请输入b的值:");
int b = input.nextInt();
System.out.println("请输入c的值:");
int c = input.nextInt();
//判断
int temp;
if (a>b) {
temp = a;
a = b;
b = temp;
}
if (b>c) {
temp = c;
c = b;
b = temp;
}
if (a>b) {
temp = a;
a = b;
b = temp;
}
System.out.println(a+","+b+","+c);
}
}