package demo10_24;
import java.util.Scanner;
public class homework04 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("分别输入x,y,z:");
double x = in.nextDouble();
double y = in.nextDouble();
double z = in.nextDouble();//定义并且输入变量x,y,z
if (x >y) {
if (x >z)
System.out.println(x);
else
System.out.println(z);
} else if (y > x) {
if (y > z)
System.out.println(y);
else
System.out.println(z);//经过比较后输出最大值
}
}
}
10-10