package work001;

public class Array001 {

    public static void main(String[] args) {
        double [] a = new double [10];
        for(int i=0;i<=a.length-1;i++) {
            a[i]=(int)(Math.random()*100+1);
        }
        for(int i=a.length-1;i>0;i--) {
            System.out.println(a[i]);           
        }
        double max;
        for(int i =0;i<a.length-1;i++) {
            for(int j=i;j<a.length-1;j++) {
                if(a[i]<a[j]) {
                    max=a[j];
                    a[j]=a[i];
                    a[i]=max;
                }
            }
        }
        System.out.println(a[0]);

    }
}