import java.util.Scanner;
class Demo
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int num=1;
int max=0;
int min=0;
int maa=0;
while(num!=0){
System.out.println("请输入数据");
num = input.nextInt();
if(num==0){
break;
}else if(num>max){
max=num;
}else if(num<min {
min=num;
}
}
System.out.println(max+" "+min);
}
}
封邑瀛鱼
相关分类