package com.itheima;import java.util.Scanner;publicclassMain{publicstaticvoidmain(String[] args){
Scanner sc =newScanner(System.in);int a,b,c,d,t;
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
d = sc.nextInt();if(a > b){
t = a;
a = b;
b = t;}if(a > c){
t = a;
a = c;
c = t;}if(a > d){
t = a;
a = d;
d = t;}if(b > c){
t = b;
b = c;
c = t;}if(b > d){
t = b;
b = d;
d = t;}if(c > d){
t = c;
c = d;
d = t;}
System.out.println(a+" "+b+" "+c+" "+d);}}
1.输入四个数,要求按由小到大的顺序输出package com.itheima;import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a,b,c,d,t; a = sc.nextInt(); b = sc.nextInt();