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


  2. public class Hello {

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

  5.                 Scanner s=new Scanner(System.in);
  6.                 int x ,y;
  7.                 System.out.print("請輸入分子:");
  8.                 x=s.nextInt();
  9.                 System.out.print("請輸入分母:");
  10.                 y=s.nextInt();
  11.                 System.out.println("x/y="+(x/y));
  12.                
  13.         }

  14. }
複製代碼

TOP

返回列表