Hi guys,
apparently I get this error message after the first while loop for whatever I do and I dont quite understand why. Any ideas?
Thanks in advance!
package de.codegym.task.task05.task0532;
import java.io.*;
/*
Aufgabe zu Algorithmen
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = 0;
int zaehler = 0;
int i = 0;
//schreib hier deinen Code
while(true){
int z = Integer.parseInt(reader.readLine());
i++;
}
System.out.println(i);
/*while(zaehler < i){
int zahl = Integer.parseInt(reader.readLine());
if(zahl <= 0){
break;
}
if(maximum < zahl){
maximum = zahl;
}
zaehler++;
}
if(maximum > 0){
System.out.println(maximum);
}*/
}
}