if u don believe you can copy my code and try it yourself but
the second last condition is not satisfied.
any help and suggestion is welcome ...
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
import java.io.*;
public class Solution{
public static void main(String[] args)throws Exception{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
int i = Integer.parseInt(s);
int max = 0;
if(i<=0){
}
else{
while(i>=1){
String s1 = reader.readLine();
int i1 = Integer.parseInt(s1);
if(i1>max){
max = i1;
}
i--;
}
System.out.println(max);
}
}
}