package liu0912;
import java.util.Scanner;
public class Nianling {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("请输入您的年龄");
double age=sc.nextDouble();
if(age>0&&age<=12)
{
System.out.println("您是儿童");
}
else if(age>12&&age<=30)
{
System.out.println("您是青年");
}
else if(age>30&&age<=60)
{
System.out.println("您是壮年");
}
else if(age<60&&age<=135)
{
System.out.println("您是老年");
}
else
{
System.out.println("不在人的年龄范围");
}
}
}
时间: 2024-12-22 02:14:31