Here's a little exercise for ya - participation voluntary.You are a starship pilot and routinely make port at many different
worlds. Each world's rotation is different; some slower, resulting
in a longer day, and some faster resulting in a shorter one.
Compounding the problem is the fact that the "Local governments" of
these worlds have not adopted a "standard" 24 hour day. Some have
20 "hours" some 25, etc, AND the "hour" does not necessarily have
60 "minutes", nor a "minute" 60 seconds. You want to build an
electronic watch (or clock) that you can set for the period (length
of a day expressed in "Earth" hours), number of hours per period,
number of minutes per hour, and number of seconds per minute. The
clock will then accurately keep time for you on the planet you are
visiting. The timekeeping abilities of this clock (and the
programming language for it) are exactly the equivalent of an
HP48-SX (see - i DID get HP calculator in there somewhere ;-)
)Your task is to write the smallest program possible to make the
clock work.Period
Planet (std hrs) Hrs/period Min/Hr Sec/min
Adaen 28.376 25 90 90
Baell 20.421 18 75 50
Calea 22.381 20 60 60
Dawaer 26.258 20 100 50OK - you can throw rocks at me now... ;oD