The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

attn william bashless (long) by gibuu2004-12-30 12:16:08
  Almost. by williamashbless2004-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 gibuu2004-12-30 13:52:58

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)