I didn't check the solution yet (I don't want to spoil it), but since is a common type of problem and we're talking about programming, let me put a spin on it: what algorithm would you use to solve the problem?
The X is which jug poured So...what kind of pattern can we discern from this? To me, it looks like we move from the lowest to the middle (until it will fill up the middle) then from middle to biggest until it will over flow then we dump what we can into the small one and rinse repeat.
That should do it I think. Have no idea as to syntax or anything. It's all notepad psuedo'd It's a really slow day at work...if only someone out there was bored enough to actually check my logic. >.> [ August 18, 2008: Message edited by: Paul Yule ]