Computing The Earth - Sharp MZ-80A Owner's Manual

Hide thumbs Also See for MZ-80A:
Table of Contents

Advertisement

25
Computing the Earth
The prince of a star takes
accurate
observation of the
earth. "The earth is a blue planet
over there
in
the Solar
System. Though slightly distorted, the earth is approx¬
imately
13.000
kilometers in diameter.
From
orbit calcula¬
tion, its
mass
is about
6 x
101®
thousand
tons."
The prince
went to
his
computer to generate the
following program for calculations of volume VE,
surface
area SE and mean
density
ZE
of the earth.
10
DE
=
1
3000
...................
Substitute the earth's diameter for variable DE.
20
WE
=
6E
+
18
..................
Substitute
the
earth's mass for variable WE.
30 SE
=
4
*
7r
*
(DE/2)
t
2
.........
This substitutes the surface
area
for variable
SE.
40 VE
=
4
*
7T
*
(DE/2)
t 3/3
........
This substitutes
the earth's volume for variable
VE.
50 ZE
=
WE/VE
*
(IE
2)
..........
This substitutes the
mean
density
for variable
ZE.
60
PRINT "EARTH DIAMETER"
;
DE
;
"
KILOMETERS"
70 PRINT "EARTH
SURFACE
AREA"
; SE; "SQUARE
KILOMETER"
80 PRINT "EARTH VOLUME" ; VE; "CUBIC KILOMETER"
90
PRINT "EARTH MASS"
; WE;
"THOUSAND TONS"
100 PRINT "EARTH MEAN DENSITY"
;
ZE;
"KILOGRAM/CUBIC METER"
110
END
The prince of
a
star
understands slightly the size of the earth. Pay much
attention to the units used
in the
calculations. Further
attention is
focused on the sequence
of
calculations
when the arithmetic expression contains,
, +
or
t
.
The
operation priority is
shown below:
I
t
(Power)
2
(Minus sign)
3
*
,
/
(Multiplication
and Division)
4
+,- (Addition and
Substraction)
The expressions below are complex
in
combination. Do you see any
difference
between the expressions?
C
c
2
+
3
t
2=11
(2 +
3)
t
2
=
25
C
2*2
t
3
=
16
(2*2)
t
3
=
64.000001
12/3
*
2
=
8
12/(3
*
2)= 2
12/3 t
2
=
1.3333333
(12/3)
t
2= 16

Advertisement

Table of Contents
loading

Table of Contents