hi, I can not figure this out.
maybe some tips, or help?
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = Integer.MIN_VALUE;
int n = Integer.parseInt(reader.readLine());
//write your code here
for (int i= 0; i <= n; i++){
int n2 = Integer.parseInt(reader.readLine());
if(n>0 && n2>n){
maximum = n2;
n++;
}else{
}
System.out.println(maximum);
}
}
}