import java.util.Scanner;
class Demo7 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println("请输入你的年龄:");
while (true) {
int x = sc.nextInt();
if (true) {
if (x>=1&& x<=12) {
System.out.println(x + "你是小学生");
} else if (x >=13&& x<= 15) {
System.out.println(x + "你是中学生");
} else if (x >=16&& x<= 18) {
System.out.println(x + "你是高中生");
} else if (x >= 19 && x <= 21) {
System.out.println(x + "你是大学生");
} else {
System.out.println(x + "你以超神");
}
}
}
}
}
{:3_65:} |