4
1\
\
\
\
\
\
5
\
\
\
\
\
\
'\
3
Experiment #2 Guy Wire Length
In this experiment, you will write a program to calculate the length of each guy wire
required to hold up a TV mast on your roof.
Suppose you are trying to install a TV mast on your roof and would like to precut the
guy wires to the top of the pole so that you can attach them easily when the pole is
stood up vertically. This is illustrated in the drawing below:
H=Vertical
Height
"-
L ~ length of
"-
each guy wire
"-
"-
"-
"
0= distance from mast
to guy anchor
Enter the following program:
10 INPUT "HEIGHTt DISTANCE"; HtD
20 L
=
SQR(H*H
+
D*D)
30 PRINT "GUY WIRE LENGTH IS"; L
112