/* -------------------------------------------------- 条件の判定 If_else_if型 If_else_if_03 -------------------------------------------------- */ import java.io.*; class If_else_if_03 { public static void main(String[] args ) throws Exception{ int a,b,sa=0; BufferedReader inp=new BufferedReader (new InputStreamReader(System.in)); String keybd; 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 ) sa=a-b; else sa=b-a; if ( a==b ) System.out.print("aとbは同じ値です"); else if ( a>b ) System.out.print("aの方が "+sa+" 大きいです"); else System.out.print("bの方が "+sa+" 大きいです"); System.out.print("\n\nプログラムを終了します"); System.out.print("\n"); } }