example program:
10INPUT”HYP”,A
20INPUT”OPP”,B
30INPUT”ADJ”,C
40INPUT”ANGLE”,D
50IFC+D=0THEN120
60IFB+D=0THEN130
70IFA+D=0THEN140
80IFB+C=0THEN150
90IFA+C=0THEN160
100IFA+B=0THEN170
120C=SQR((A^2)-(B^2)):D=ASN(B/A):GOTO180
130B=SQR((A^2)-(C^2)):D=ASN(B/A):GOTO180
140A=SQR((B^2)+(C^2)):D=ATN(B/C):GOTO180
150B=A*SIND:C=A*(COSD):GOTO180
160A=B/(SIND):C=A*(COSD):GOTO180
170A=C/(COSD):B=C*(TAND):GOTO180
180 PRINT”HYP=”;INT(10000*A+.5)/10000
190 PRINT”OPP=”;INT(10000*B+.5)/10000
200 PRINT”ADJ=”;INT(10000*C+.5)/10000
210 PRINT”ANGLE”;INT(10000*D+.5)/10000
220E=90-D:PRINT”OTHER ANGLE”;INT(10000*E+.5)/10000
230GOTO10
2007-07-14
07:26:01
·
1 answers
·
asked by
slowbowls
2
in
Computers & Internet
➔ Software