返回列表 發帖
  1. import java.io.Console;
  2. public class Ch05
  3. {
  4.     public static void main(String args[])
  5.     {
  6.          int x,y,z;
  7.          Console c=System.console();
  8.          x=Integer.parseInt(c.readLine("輸入X的值:"));
  9.          y=Integer.parseInt(c.readLine("輸入y的值:"));
  10.          z=Integer.parseInt(c.readLine("輸入z的值:"));
  11.           System.out.println("x+y+z="+(x+y+z));
  12.           System.out.println("x-y-z="+(x-y-z));
  13.           System.out.println("x*y*z="+(x*y*z));
  14.           System.out.println("x/y/z="+(x/y/z));
  15.           System.out.println("x%y%z="+(x%y%z));

  16.     }





  17. }
複製代碼

TOP

返回列表