Skip to main content

Practice ยท 4 of 4

Aggregate dashboard

CHALLENGE
Difficulty: beginner+25 XP

Implement static (int Count, int Total, double Average) Stats(IEnumerable<int> nums) (empty/null โ†’ (0, 0, 0.0)), static bool AllPositive(IEnumerable<int> nums) (empty โ†’ true โ€” vacuous truth), and static int FirstBig(IEnumerable<int> nums, int threshold) โ€” first element > threshold or -1 when none.

Back to lesson: Practice: LINQ workout