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

  3.         public static void main(String[] args) {
  4.                 // TODO 自動產生的方法 Stub
  5.            int age;
  6.            Scanner c=new Scanner(System.in);
  7.            System.out.print("請輸入年紀:");
  8.            age=Integer.parseInt(c.nextLine());
  9.            if(age>=18)
  10.            {
  11.                    System.out.print("准考駕照");
  12.            }else
  13.            {
  14.                    System.out.print("你這個屁孩,滾吧");
  15.            }
  16.         }

  17. }
複製代碼

TOP

返回列表