the result is always correct, so whats the problem?
package de.codegym.task.task07.task0721;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Tiefst- und Höchstwerte in Arrays
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int hoechstwert = Integer.MIN_VALUE;
int tiefstwert = Integer.MAX_VALUE;
int[] liste = new int[20];
//schreib hier deinen Code
for(int i = 0; i < liste.length; i++){
int a = Integer.parseInt(reader.readLine());
liste[i] += a;
if(a > hoechstwert){
hoechstwert = a;
}else if(a < tiefstwert){
tiefstwert = a;
}
//System.out.println(liste[i]);
}
System.out.print(hoechstwert + " " + tiefstwert);
}
}