Anonymous user
Horizontal sundial calculations: Difference between revisions
m
→[[Horizontal_sundial_calculations#ALGOL 68]]: restructure code layout.
(→[[Horizontal_sundial_calculations#ALGOL 68]]: Task: Scientific calculations example) |
m (→[[Horizontal_sundial_calculations#ALGOL 68]]: restructure code layout.) |
||
Line 22:
> Simon
-->
<lang algol68>BEGIN
REAL lat, slat, lng, ref;▼
new line(stand out);
print
▲ REAL lat, slat;
▲ print ( "Enter latitude " );
▲ slat := sin(lat*2*3.1416/360) ;
▲ print ( ("sin latitude: ", float(slat,8,2,1), new line ) );
▲ print ( "Enter longitude " );
▲ print ( "Enter legal meridian " );
▲ print ( ("diff long: ", (lng - ref), new line ) );
FOR h FROM -6 TO 6
DO
REAL hra , hla ; # define hour angle and hour line angle #
hra := 15 * h
hra := hra - (lng - ref); # but correct for longitude difference #
hla :=
# page 132 of a68gdoc.pdf documentationfile #
print
new line(stand out)
OD
END</lang>
Output:
|