import java.util.Scanner;
class arr6{
public static void main(String[] args) {
Scanner Sc = new Scanner(System.in);
System .out.println("请输入一个数据a=:");
int a =Sc.nextInt();
System .out.println("请输入一个数据b=:");
int b =Sc.nextInt();
System .out.println("请输入一个数据c=:");
int c =Sc.nextInt();
int [] arr ={a,b,c};
for (int x=0;x<arr.length ; x++) { //遍历把所有的数都拿出来.
if (arr[0]>arr[x]) {
System.out.println(arr[0]);
}else {
System.out.println(arr[x]);
}
}
System.out.println("Hello World!");
}
}
|
|