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.
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 :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
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?
I think that's what I used, but it deleted it :)