返回列表 發帖
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;

  4. public class C519 {
  5.         BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
  6.         String str;
  7.         int n;
  8.        
  9.         C519() throws IOException
  10.         {
  11.                 System.out.print("請輸入一字串:");
  12.                 str=br.readLine();
  13.                 System.out.println(str);
  14.                
  15.                 System.out.print("請輸入一整數:");
  16.                 n=Integer.parseInt(br.readLine());
  17.                 System.out.println(n);
  18.                
  19.         }
  20.         public static void main(String[] args) throws Exception
  21.         {
  22.                 new C519();
  23.         }
  24. }
複製代碼

TOP

返回列表