Does anybody can help with the last task? :)
package pl.codegym.task.task05.task0532;
import java.io.*;
/*
Zadanie
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(reader.readLine());
int[]tab=new int[N];
for(int i=0;i<N;i++){
if(N<=0)
System.exit(0);
else
tab[i] = Integer.parseInt(reader.readLine());
}
int max = tab[0];
for(int i=0;i<tab.length;i++){
if(max<tab[i]){
max=tab[i];
}
}
System.out.println(max);
}
}