Skip to main content

Practice · 2 of 4

Split the bill exactly

CHALLENGE
Difficulty: beginner+25 XP

Implement static decimal Split(decimal total, int people) returning each person's share. Total is decimal; division by people must be decimal division.

Back to lesson: Practice: Types under pressure