package com.codegym.task.task07.task0721;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Min and max in arrays
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int[] numbers = new int[20];
int maximum = numbers[0];
int minimum = numbers[0];
for (int i = 0; i < 20; i++) {
numbers[i] = Integer.parseInt(reader.readLine());
}
for (int i = 0; i < numbers.length; i++) {
if (maximum < numbers[i]) {
maximum = numbers[i];
}
if (minimum > numbers[i]) {
minimum = numbers[i];
}
}
System.out.print(maximum + " " + minimum);
}
}

# where is the mistake?

Resolved

-1 -20"