//输入出生年月日得出年龄
public static void test3() {
int a, b, c;
Scanner sc = new Scanner(System.in);
System.out.println("请输入你的出生年份");
int x = sc.nextInt();
System.out.println("请输入你的出生月份");
int y = sc.nextInt();
System.out.println("请输入你的出生日");
int z = sc.nextInt();
a = 2023 - x;
b = 7 - y;
c = 30 - z;
if (a > 0) {
if (b > 0 && c > 0) {
System.out.println("你今年" + a + "岁了");
} else if (b < 0) {
a--;
System.out.println("你今年" + a + "岁了");
} else if (b > 0 && c < 0) {
a--;
System.out.println("你今年" + a + "岁了");
} else if (b ==0 &&c>0) {
System.out.println("你今年" + a + "岁了");
}else if (b == 0&&c<0){
a--;
System.out.println("你今年" + a + "岁了");
}else if (b ==0 &&c ==0){
System.out.println("HAPPY BIRTHDAY!");
}
} else if (a < 0) {
System.out.println("吃奶去");
}
}
//算年龄的第二种方法
public static void shengri(){
Scanner input =new Scanner(System.in);
System.out.println("出生日期");
int a1 = input.nextInt();
int b1 =input.nextInt();
int c1 =input.nextInt();
Scanner input1 =new Scanner(System.in);
System.out.println("当前日期");
int a2 = input1.nextInt();
int b2 = input1.nextInt();
int c2 = input1.nextInt();
int x1,y1,x2,y2,c;
x1 = b1 * 100 + c1;
y1=a1;
x2 = b2 * 100 + c2;
y2=a2;
if( x1 >= x2 ){
c = y2 - y1 - 1 ;
System.out.println(c);
}
else if( x1 < x2 ){
c = y2 - y1 ;
System.out.println(c);
}
}