返回列表 發帖
  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,y;
  8.          System.out.print("x是多少啦:");
  9.          x=Integer.parseInt(c.readLine());
  10.          System.out.print("y又是多少啦:");
  11.          y=Integer.parseInt(c.readLine());
  12.          if(x>y)
  13.             System.out.println("x>y這樣都不會?");
  14.          else if(x<y)
  15.             System.out.println("x<y這樣都不會?");
  16.          else
  17.            System.out.println("x=y這樣都不會?");
  18.     }


  19. }
複製代碼

TOP

返回列表