返回列表 發帖
  1. import java.util.Scanner;

  2. public class A {

  3.         public static void main(String[] args)
  4.         {
  5.                 Scanner s=new Scanner(System.in);
  6.                 int x;
  7.                 System.out.print("Enter your age");
  8.                 x=s.nextInt();
  9.                
  10.                 if(x>=18)
  11.             System.out.println("You have fufilled the age requirment for a liscense");
  12.                 else
  13.             System.out.println("You have not fufilled the age requirment for a liscense");
  14.         }
  15. }
  16.                
複製代碼

TOP

返回列表