返回列表 發帖
  1. import java.io.Console;
  2. public class Ch10
  3. {
  4.     public static void main(String args[])
  5.     {
  6.         Console c=System.console();
  7.         int x=Integer .parseInt(c.readLine("x的值: "));
  8.         int y=Integer .parseInt(c.readLine("y的值: "));
  9.         if(x>y)
  10.             System.out.println("x大於y");
  11.         else if(x<y)
  12.             System.out.println("x小於y");
  13.         else
  14.             Syeyem.out.println("兩數相等");
  15.     }
  16. }
複製代碼

TOP

返回列表