/* -------------------------------------------------- 2個の数字のソート If_08_sort1 -------------------------------------------------- */ import java.io.*; class If_08_sort1 { public static void main(String[] args ) throws Exception{ BufferedReader inp=new BufferedReader (new InputStreamReader(System.in)); String keybd; System.out.print("---数字を2個入れてください---\n"); int a,b,w; System.out.print("aはいくつ?"); keybd=inp.readLine(); a=Integer.parseInt(keybd); System.out.print("bはいくつ?"); keybd=inp.readLine(); b=Integer.parseInt(keybd); if ( a > b ) { w=a; a=b; b=w; } System.out.print("\n小さい方から並べます\n"); System.out.print(a+" "+b+"\n"); } }