I'm having a problem (possibly due to lack of sleep!) where I'm trying to solve a maths problem in C#.
Let's say I have a drinks machine, and I have three empty rows that can be filled with Cola. I have 17 cans of Cola in my hand and I have to fill each row one at a time.
For example...
Pass 1:
Add Cola to Row 1. Drinks = 1
Add Cola to Row 2. Drinks = 1
Add Cola to Row 3. Drinks = 1
Pass 2:
Add Cola to Row 1. Drinks = 2
Add Cola to Row 2. Drinks = 2
Add Cola to Row 3. Drinks = 2
...
Pass 6
Add Cola to Row 1. Drinks = 6
Add Cola to Row 2. Drinks = 6
Add Cola to Row 3. Drinks = 5 (no more drinks left at this point.
For some reason, I'm completely lost. Can anyone help?!