q4

q4
mail@pastecode.io avatar
unknown
java
a year ago
367 B
5
Indexable
Never
 public static void main(String[] args)
    {
        Scanner input = new Scanner(System.in);
        int[] numbers = new int[5];
        for (int i = 0; i < 5; i++)
        {
            System.out.println("Enter " + i + " :");
            numbers[i] = input.nextInt();
        }
        Arrays.sort(numbers);
        System.out.println(numbers[2]);
    }