返回列表 發帖
  1. import java.util.Scanner;
  2. public class h01 {

  3.         static Scanner s=new Scanner(System.in);
  4.         public static void main(String[] args) {
  5.                 float x,y;
  6.         System.out.print("輸入分子 : ");
  7.         x=s.nextInt();
  8.         System.out.print("輸入分母 : ");
  9.         y=s.nextInt();
  10.         System.out.print(x+"/"+y+"="+(x/y));
  11.         

  12.         }

  13. }
複製代碼

TOP

返回列表