import java.util.Scanner; /*-------------------------------------  IF else if型 -------------------------------------*/ public class IfElseIf03 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a,b; int sa=0; System.out.print("aはいくつ-->"); a=sc.nextInt(); System.out.print("bはいくつ-->"); b=sc.nextInt(); if (a>b) sa=a-b; else sa=b-a; if (a==b) System.out.print("aとbは等しいです\n"); else if (a>b) System.out.print("aが"+sa+"大きいです\n"); else System.out.print("bが"+sa+"大きいです\n"); System.out.print("\nプログラムを終わります\n"); } }