public static void main(String[] args) {
int inVual = 45;
if(inVual > 20){
System.out.println("青年人");
}
else if(inVual > 40) {
System.out.println("中年人");
}
else if(inVual >60){
System.out.println("老年人");
}
else {
System.out.println("输入不对请从新输入");
}
int a = 9,b;
System.out.println(a);
b= a > 1 ? 100 : 200;
System.out.println(b);
if (a>1) {
b=100;
System.out.println(b);
} else {
b=200;
System.out.println(b);
}
if (inVual > 60) {
System.out.println("老年人");
}
else if( inVual > 40) {
System.out.println("中年人");
}
else if (inVual >20) {
System.out.println("青年人");
} else {
System.out.println("王成龙是小猪");
}
if (inVual >15 && inVual <21) {
System.out.println("青年人");
}
else if(inVual >21 && inVual < 46){
System.out.println("中年人");
}
else if(inVual > 46 && inVual <110){
System.out.println("老年人");
}
else {
System.out.println("输入不对请从新输入···");
}
char X = ‘二‘;
switch (X) {
case ‘一‘ :
System.out.println("一");
break;
case ‘二‘ :{
System.out.println(‘二‘);
}
case ‘三‘ :{
System.out.println("三");
}
case ‘四‘ :{
System.out.println("四");
break;
}
case ‘五‘ :{
System.out.println("五");
break;
}
default: System.out.println("输入不对请从新输入");
break;
}
int ssq = 0 + inVual++ + 100;
System.out.println(ssq);