package com.itheima.test; import java.util.Scanner; public class Test2 { public static void main(String[] args) { /*需求: 您和您的约会对象正视图在餐厅获得一张桌子. 键盘录入两个整数,表示您和您的约会对象衣服的时髦度.(手动录入0~10之间的整数,不能录其他) 如果您的时髦度大于您对象的时髦度,相亲就喜欢成功,输出true 否则输出false*/ //1.键盘录入两个整数表示衣服的时髦度 Scanner sc = new Scanner(System.in); System.out.println("请输入我们自己的衣服时髦度"); int myFashion = sc.nextInt(); System.out.println("请输入相亲对象的时髦度"); int girlFashion = sc.nextInt(); //2.把我衣服的时髦度和女孩衣服的时髦度进行比较就可以了 boolean result = myFashion > girlFashion; //3.打印结果 System.out.println(result); } }
02-09
761
01-08
561
05-12
156