Problem 15 Max Array - Results match expected but still wrong

Back to Problem Solutions forum

BadMotivator     2015-11-29 19:36:31

I have coded two attempts at problem 15 - Maximum of array (Java and C#) My answers match the expected, but still say wrong. Anyone know why this could be?

Quandray     2015-11-29 21:32:38
User avatar

It's not much help, but I can confirm that your Java & C# code give the same answer as my C++ code.

tapukist1990gamer     2019-09-26 02:06:05

The question doesn't only want you to give the right answer, it has to look right as well. You have to make the program write max solution first, then a single space, then the minimum solution.

Eg: 300 1

not 300, 1

1 300

or even

1, 300

Now what I want to know is, how do I make the program read from the lines given without having to paste it into my program and comma it one by one?

Please login and solve 5 problems to be able to post at forum