- import java.util.Scanner;
- public class A {
- public static void main(String[] args)
- {
- Scanner s=new Scanner(System.in);
- int x;
- System.out.print("Enter your age");
- x=s.nextInt();
-
- if(x>=18)
- System.out.println("You have fufilled the age requirment for a liscense");
- else
- System.out.println("You have not fufilled the age requirment for a liscense");
- }
- }
-
複製代碼 |