import java.util.*; class ArraySort { int []a=new int[5]; int l,f=0; Scanner scan =new Scanner(System.

in); void m1() { int i = 0; //input while(i<a.length) { a[i]=scan.nextInt(); i++; } int l=a[0]; for(i=0;i<a.length;i++) { for(int j=0;j<a.length;j++) { if(a[j]>a[i]) l=a[j]; } System.out.println(l); } } public static void main(String[]arg) { ArraySort ob=new ArraySort(); ob.m1(); } }

Sign up to vote on this title
UsefulNot useful