I am unable to understand the task requirement.
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 = 0;
int count = 0;
//write your code here
while(true)
{
int a = Integer.parseInt(reader.readLine());
if(a<0)
break;
count++;
int val = maximum>a ? maximum : a;
maximum = val;
}
System.out.println("the maximum of "+count+"entered numbers "+maximum);
}
}