1
I’m using a platform that has multiple exercises, the Uri Online Judge, and it automatically fixes the output of the program, but it’s in Mono
This is my code:
string a = Console.ReadLine();
string[] temp = a.Split(" ");
List<double> maior = new List<double>();
maior.Add(double.Parse(temp[0]));
maior.Add(double.Parse(temp[1]));
maior.Add(double.Parse(temp[2]));
maior.Sort();
Console.WriteLine(maior[2]+ " eh o maior");
On my PC I use the . NET Core, and it works without error, however when I run on the platform system of this error:
Main.cs(10,31): error CS1502: The best overloaded method match for `string.Split(params char[])' has some invalid arguments
/usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Main.cs(10,37): error CS1503: Argument `#1' cannot convert `string' expression to type `char[]'
Link of the website with the exercise.
Mono of the site is in version: 5.4.0
Did the answer solve your question? Do you think you can accept it? See [tour] if you don’t know how you do it. This would help a lot to indicate that the solution was useful for you. You can also vote on any question or answer you find useful on the entire site (when you have 15 points).
– Maniero