//判断三个值
Scanner in = new Scanner(System.in);
int a;
int b;
int c;
System.out.println("请输入三个比较值:yhd");
a = in.nextInt();
b = in.nextInt();
c = in.nextInt();
int max;
if (a > b) {
if (a > c) {
max = a;
// System.out.println("最大值:" + max);
}
else {
max = c;
// System.out.println("最大值:" + max);
}
}
else {
if (b > c) {
max = b;
// System.out.println("最大值:" + max);
} else {
max = c;
// System.out.println("最大值:" + max);
}
}
System.out.println("最大值:" + max);