import java.util.Scanner;
class test{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("请输入您的身高 (cm)");
int hegith = scan.nextInt();
System.out.println("请输入您的财富 (千万)");
double wealth = scan.nextDouble();
System.out.println("请选择您是否帅气 (true/false)");
boolean handsome = scan.nextBoolean();
if(hegith >= 180 && wealth >= 1 && handsome == true)
{System.out.println("条件非常棒,我必须嫁给你");}
else if(hegith >= 180 || wealth >= 1 || handsome == true)
{System.out.println("条件还不错,可以考虑考虑");}
else {System.out.println("还需要再努力努力");}
}
}
给出了三个选项,有其中一个满足条件即可通过
最新推荐文章于 2024-05-31 10:46:10 发布