Anonymous user
Horizontal sundial calculations: Difference between revisions
Horizontal sundial calculations (view source)
Revision as of 21:46, 22 September 2010
, 13 years agoLogo
(+Haskell) |
(Logo) |
||
Line 378:
HR= 5; HRA= 75.500; HLA= -18.451
HR= 6; HRA= 90.500; HLA= 84.225</pre>
=={{header|Logo}}==
<lang logo>type "|Enter latitude: |
make "lat readword
type "|Enter longitude: |
make "long readword
type "|Enter legal meridian: |
make "long :long - readword
print [Hour : HourAngle , DialAngle]
for [hour -6 6] [
make "hra 15 * :hour - :long
make "hla arctan product sin :lat quotient sin :hra cos :hra
print (sentence "hour :hour ": :hra ", :hla)
]</lang>
=={{header|OCaml}}==
|