加了一点,瞬间变高端
public class HelloWorld {
public static void main(String[] args) {
java.util.Scanner sc =
new Java.util.Scanner(System.in);
System.out.println("年龄:");
int age=sc.nextInt();
if(age > 18){
System.out.println("成年了");
}
else {
System.out.println("未成年");
}