This computes in eclipse and here, with or without negative numbers.
Am I supposed to use double?
I start to think my solution might be a little convoluted.
Probably don't need the array at all., can just check maxval after each input. Whoops.
Either way, why won't this convoluted mess verify?
package com.codegym.task.task04.task0419;
/*
Maximum of four numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int[] valueArray = new int[3];
// int v = Integer.parseInt(reader.readLine());
int maxVal = valueArray[0];
for (int fillArray = 0; fillArray<3; fillArray++)
{
valueArray[fillArray] = Integer.parseInt(reader.readLine());
}
for (int i = 1; i<3; i++)
{
if (maxVal<valueArray[i])
{
maxVal= valueArray[i];
}
} //for
System.out.print(maxVal);
} //main
}//class