返回列表 發帖
  1. public class JAVA02 {
  2.           
  3.     public static void main(String args[])
  4. {
  5.         Scanner c= new Scanner(System.in);
  6.       
  7.         int age;
  8.     System.out.print("請輸入年紀");
  9.     age = Integer.parseInt(c.nextLine()) ;

  10.       
  11.       
  12.      if(age >= 18 )  
  13.       
  14.        {
  15.               System.out.print("可以考了");
  16.        }
  17.      else {
  18.              
  19.                 System.out.print("還不行考");
  20.      }
  21.       


  22.       
  23.   }
  24. }
複製代碼

TOP

返回列表