Archimedes And The Mysterious Soldier - Sharp MZ-80A Owner's Manual

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

Advertisement

26
|
Archimedes and the
Mysterious
Soldier
The
sum of
the interior angles of a triangle is
180°.
With a flash of inspiration, Archimedes
sat
on the road and
drew a triangle. There came a mysterious soldier with his spear pointing
at
Archimedes.
Soldier:
Archimedes,
your life is
finished. Be
prepared
to
die!
Archimedes:
Wait
a
minute,
1 will finish this calculation.
Soldier:
What? Angle A is
30°
and
angle B
is
a right angle.
It's easy
to
determine angle
C.
60°.
If
side
CA
length is
known,
side AB and BC lengths or even the
area of the
triangle
can be
easily determined.
Archimedes:
Don't
be silly.
Soldier:
All that needed
is to generate a
BASIC program.
Let
me
see.
Oh,
Yes,
it's good with CA
=
12.
10 A
=
30 : B
=
90 : CA
=
12
20 AB
=
CA*COS(A*
w/I80)
30 BC
=
CA
*
SIN
(A
*
tr/180)
40
S
=
AB
*
BC/2
50
C= 180-
A -
B
60 PRINT
"AB
="
; AB,
"BC
=
"
;
BC, "CA
=
"
;
CA
70
PRINT "AREA
S=
"
;S
80
PRINT
"A
=
"
;
A,
"B
=
"
;
B.
"C
=
"
;C
90
END
Using the
inverse tangent ATN,
let's determine the size of angle C from the
side
AB and BC lengths known. This
requires
the following
to
be keyed-in.
50
C
=
ATN
(AB/BC)
*
180/tr
The result
is in
the unit of degree. The
same result
is obtained, isn't it?

Advertisement

Table of Contents
loading

Table of Contents