返回列表 發帖
  1. import java.util.Scanner;
  2. public class ch44
  3. {
  4.     public static void main(String args[])
  5.     {
  6.       String a;
  7.       int b;
  8.       float c;
  9.       Scanner input=new Scanner(System.in);
  10.       System.out.print("請輸入一串字串");
  11.       a=input.next();
  12.       System.out.println(a);
  13.       System.out.print("請輸入一串整數");
  14.       b=input.nextInt();
  15.       System.out.println(b);
  16.       System.out.print("請輸入一串浮點數");
  17.       c=input.nextFloat();
  18.       System.out.println(c);
  19.     }
  20. }
複製代碼

TOP

返回列表