返回列表 發帖
  1. import java.util.Scanner;


  2. public class World {

  3.         public static void main(String[] args) {
  4.                 // TODO 自動產生的方法 Stub

  5.                 int a ,b;
  6.                 Scanner c=new Scanner(System.in);
  7.                 System.out.println("請輸入a:");
  8.                 a=c.nextInt();
  9.                 System.out.println("請輸入b:");
  10.                 b=c.nextInt();
  11.                 if(a<b)
  12.                         System.out.println(a+"<"+b);
  13.                 else if(a>b)
  14.                         System.out.println(a+">"+b);
  15.                 else
  16.                         System.out.println(a+"="+b);
  17.         }

  18. }
複製代碼

TOP

返回列表