• + 0 comments
    Console.WriteLine(a.Count(val => val > 0) / n);
    

    Won't a.Count on an arry of integers return an integer? If so, the left operand and right are ints, so this would result in integer division with an integer result?

    Console.WriteLine("{0:F6}", (double)a.Count(val => val > 0) / n);
    

    I think that's what I used, but it deleted it :)