What's the issue on my end?
I'm not passing "The program should display the maximum of the N entered numbers."
manually tested it and seems fine...
ty
package com.codegym.task.task05.task0532;
import java.io.*;
import java.util.Scanner;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int nr = scanner.nextInt();
if (nr < 0) {
} else {
int maximum = nr;
for (int i = 0; i < nr; i++) {
nr = scanner.nextInt();
if (nr > maximum) {
maximum = nr;
}
}
if (maximum <= 0) {
} else
System.out.println(maximum);
}
}
}