/*********************************************** 2個の数字のソート If_sort01 ***********************************************/ import java.util.*; public class If_sort01 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int a,b,w; System.out.print("aはいくつ→"); a=sc.nextInt(); System.out.print("bはいくつ→"); b=sc.nextInt(); if ( a > b ) { w=a; a=b; b=w; } System.out.print("\n小さい順に並べます\n"); System.out.print(a+" "+b); } }