|
|
Back to UserFriendly Strip Comments Index
|
attn william bashless (long) | by gibuu | 2004-12-30 12:16:08 |
|
Almost. | by williamashbless | 2004-12-30 12:30:33 |
| for clarity :) |
by gibuu |
2004-12-30 13:50:35 |
because my programming skills outdated, out of practice and further are limited to a couple macro languages, pascal, and fortran my solution may not be entirely clear.
Weigh 3.3
at second glance it look like my last line should read the heavy coin is the phony
you wrote"You don't address what happens if G1 is light."
I specifically wrote the solution to apply to whichever was heavy or lighter and that is why the third weighing does not give lettered solutions. To compensate I used if else to indicate whether G1 was the lighter or heavier side.
you wrote "if abe is heavy, it could be simply because f is light, on the other side."
you are correct I failed to include an evaluation of the weigh
so with more corrections 3.3 should read as follows:
Weigh 3.3
IF G1 was heavy
..If abe is heavy
....weigh a against b
....if balanced
......f is the phony coin
....else
......the heavy coin is the phony
..Else
....weigh c against d
....if balanced
......e is the phony coin
....else
......the heavy coin is the phony
ELSE
..If weigh e against f
....the heavy coin is the phony
looking at the preview I noticed that while I was using spaces to distinguish If and Else everything was being pushed left making it harder to see what if's match what else's :) I added periods..hopefully this makes it easier to parse not harder. |
|
[ Reply ] |
|
aargh remove the very last "If" | by gibuu | 2004-12-30 13:52:58 |
|
|
[Todays Cartoon Discussion]
[News Index]
|
|