Practice · 4 of 4
Floating-point honesty
CHALLENGE
Difficulty: beginner+25 XP
Implement static bool SameTotal(decimal a, decimal b, decimal tolerance) — true when |a−b| ≤ tolerance — and static double Mean(List<double> xs) returning the average (empty/null → 0.0). Tests pin exact-decimal behavior and tolerance logic.
Press Submit to check your solution.
Back to lesson: Practice: Debugging workout