(12 XP) A function that checks if a cake can be divided fairly.
- Fork this repository to your GitHub account.
- Open solution file in Visual Studio.
- Open file
Divider.cs
. - Implement the method
EqualSlices(int total, int people, int each)
that checks, if a cake can be divided fairly between people. - Run with
CTRL+F5
to test it. - If all tests are passed, commit & sync your repository.
- Send a link to your repository for Lab Master (in #slack) to check it.
EqualSlices(11, 5, 2) ➞ true
// 5 people x 2 slices each = 10 slices < 11 slices
EqualSlices(11, 5, 3) ➞ false
// 5 people x 3 slices each = 15 slices > 11 slices
EqualSlices(8, 3, 2) ➞ true
EqualSlices(8, 3, 3) ➞ false
EqualSlices(24, 12, 2) ➞ true