返回列表 發帖
  1. import java.io.Console;
  2. public class Ch04
  3. {
  4.     public static void main(String args[])
  5.     {
  6.         int a;
  7.         float b;
  8.         Console c=System.console();

  9.         a=Integer.parseInt(c.readLine("請輸入字串一:"));
  10.         System.out.println("字串一:"+a);

  11.         b=Float.parseFloat(c.readLine("請輸入字串二:"));
  12.         System.out.print("字串二:"+b);
  13.     }
  14. }
複製代碼

TOP

返回列表