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