We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
var n = Double.Parse(Console.ReadLine());
var a = Console.ReadLine().Split(' ').Select(val => Int32.Parse(val));
Console.WriteLine(a.Count(val => val > 0) / n);
Console.WriteLine(a.Count(val => val < 0) / n);
Console.WriteLine(a.Count(val => val == 0) / n);
Plus Minus
You are viewing a single comment's thread. Return to all comments →
I'm feeling like I'm cheating :) I love Linq