//求是否为正数
public class Java_22 {
public static void main(String[] args) {
int a=0;
if(a>=0){
System.out.println("它为正数");
}else if(a<0){
System.out.println("它为负数");
}else{
System.out.println("他不为正数");
}
}
}
//高:180cm以上 ,富:1千万以上, 帅:是
public class Java_23 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("请输入您的身高(cm):");
int cm = input.nextInt();
System.out.println("请输入您的身价(千万):");
int qw = input.nextInt();
System.out.println("请输入您是否帅(true/false):");
boolean shuai = input.nextBoolean();
if (cm > 180 && qw > 1000 && shuai == true) {
System.out.println("我一定要嫁给他!!!");
} else if (cm > 180 || qw > 1000 || shuai == true) {
System.out.println("嫁吧,比上不足,比下有余.");
} else if (cm <= 180 && qw <= 1000 && shuai == false) {
System.out.println("不嫁");
}
}
}