1、一个有趣的编程程序员的爱情故事/ 男孩有房boolean boyHasHouse=false;/男孩有车boolean boyHasCar=true;/女孩的感情值int girlsLoverCount=5;/女孩是否愿意等boolean girlsCanWaite=true;/男孩的年薪int boySalary=80000;/男孩送玫瑰花boolean boyGiveFlower=true;/情人节(值为一年中的第几天)int loverDay=363;/女孩的生日int girlsBir=364;/年龄int age=21;/如果男孩没房没车if(boyHasHouse=true els
2、e if( (boyHasHouse=true) | (boyHasCar=true) )System.out.println(“男孩有房或者有车,女孩暂时不嫁给男孩,接下来要看女孩是否愿意等“);if(girlsCanWaite=true)/当男孩的年薪没有超过 10 万,并且女孩的感情值没有超过 8System.out.println(“女孩愿意等男孩“);while(!(boySalary100000 day 8)System.out.println(“结婚了,完美啦!“);else/钱赚到了,但是年龄太大了,女孩还是易主了。System.out.println(“男孩年龄太大了,女孩投
3、奔其他男孩“);elseSystem.out.println(“女孩不等男孩了,去投奔其他男孩了“);/ 男孩有房boolean boyHasHouse=false;/男孩有车boolean boyHasCar=true;/女孩的感情值int girlsLoverCount=5;/女孩是否愿意等boolean girlsCanWaite=true;/男孩的年薪int boySalary=80000;/男孩送玫瑰花boolean boyGiveFlower=true;/情人节(值为一年中的第几天)int loverDay=363;/女孩的生日int girlsBir=364;/年龄int age
4、=21;/如果男孩没房没车if(boyHasHouse=true else if( (boyHasHouse=true) | (boyHasCar=true) )System.out.println(“男孩有房或者有车,女孩暂时不嫁给男孩,接下来要看女孩是否愿意等“);if(girlsCanWaite=true)/当男孩的年薪没有超过 10 万,并且女孩的感情值没有超过 8System.out.println(“女孩愿意等男孩“);while(!(boySalary100000 day 8)System.out.println(“结婚了,完美啦!“);else/钱赚到了,但是年龄太大了,女孩还是易主了。System.out.println(“男孩年龄太大了,女孩投奔其他男孩“);elseSystem.out.println(“女孩不等男孩了,去投奔其他男孩了“);