whyyyyyyyy?
Can anybody tell me, what is wrong?
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=0;
int tiefstwert=0;
int[] ganzzahlen = new int[20];
for(int i=0; i<ganzzahlen.length; i++){
ganzzahlen[i] = Integer.parseInt(reader.readLine());
if(ganzzahlen[i] > hoechstwert)
hoechstwert = ganzzahlen[i];
if(ganzzahlen[i]< tiefstwert)
tiefstwert = ganzzahlen[i];
}
System.out.print(hoechstwert + " " + tiefstwert);
}
}