package mpublic class Hello1 {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
System.out.println("请输入第一个数字");
int num1 = sc.nextInt();
System.out.println("请输入第二个数字");
int num2 = sc.nextInt();
System.out.println("请输入第三个数字");
int num3 = sc.nextInt();
int max;
int min;
if(num1 > num2)
{
max = num1;
}
else {
max = num2;
}
if(max>num3)
{
}
else {
max = num3;
}
if(num1 < num2)
{
min= num1;
}
else {
min = num2;
}
if(min<num3)
{
}
else {
min = num3;
}
System.out.println("输出最大值");
System.out.println(max);
System.out.println("输出最小值");
System.out.println(min);
}
}