GOTO MODE
HELP:
PRINT "MODES: ADDITION, SUBTRACTION, MULTIPLICATION, DIVISION,SINE,COSINE,TANGENT"
PRINT ""
PRINT "TYPE 'MODE' OR 'M' OR '1' TO GO BACK TO MODES"
PRINT ""
INPUT I$
IF I$ = "MODE" THEN
CLW
GOTO MODE
END IF
IF I$ = "M" THEN
CLW
GOTO MODE
END IF
IF VAL(I$) = 1 THEN
CLW
GOTO MODE
END IF
MODE:
PRINT "CHOOSE MODE:"
PRINT ""
PRINT "TYPE 'H' OR 'HELP' FOR A LIST OF MODES"
PRINT ""
KEYBOARD ON
INPUT I$
IF I$ = "A" OR I$="ADD" OR I$="ADDITION" OR VAL(I$)=1 THEN
CLW
MATH$="PLUS"
GOTO EASY4
END IF
IF I$ = "S" OR I$="SUBTRACT" OR I$="SUBTRACTION" OR VAL(I$)=2 THEN
CLW
MATH$="MINUS"
GOTO EASY4
END IF
IF I$ = "M" OR I$="MULTIPLY" OR I$="MULTIPLICATION" OR VAL(I$)=3 THEN
CLW
MATH$="TIMES"
GOTO EASY4
END IF
IF I$ = "D" OR I$="DIVIDE" OR I$="DIVISION" OR VAL(I$)=4 THEN
CLW
MATH$="DIVIDE"
GOTO EASY4
END IF
IF I$ = "SIN" THEN GOTO SINE
IF I$ = "SINE" THEN GOTO SINE
IF VAL(I$) = 5 THEN GOTO SINE
IF I$ = "COS" THEN GOTO COSINE
IF I$ = "COSINE" THEN GOTO COSINE
IF VAL(I$) = 6 THEN GOTO COSINE
IF I$ = "TAN" THEN GOTO TANGENT
IF I$ = "TANGENT" THEN GOTO TANGENT
IF VAL(I$) = 7 THEN GOTO TANGENT
IF I$ = "H" THEN
CLW
GOTO HELP
END IF
IF I$ = "HELP" THEN
CLW
GOTO HELP
END IF
SUB CALCULATE(NUM1,NUM2,OPER$,ANSWER)
IF OPER$="PLUS" THEN ANSWER=NUM1+NUM2
IF OPER$="MINUS" THEN ANSWER=NUM1-NUM2
IF OPER$="TIMES" THEN ANSWER=NUM1*NUM2
IF OPER$="DIVIDE" THEN
IF NUM2<>0 THEN
ANSWER=NUM1/NUM2
ELSE
PRINT "ERROR #/0"
END IF
END IF
END SUB
EASY4:
PRINT "INPUT 1:"
INPUT A
PRINT "INPUT 2:"
INPUT B
C=0
CALL CALCULATE(A,B,MATH$,C)
PRINT "ANSWER:";C
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C
PRINT ""
END IF
GOTO MODE
SINE:
PRINT "SINE OR ARC-SINE?"
INPUT A$
IF A$ = "S" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = SIN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "SIN" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = SIN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "SINE" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = SIN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF VAL(A$) = 1 THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = SIN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF VAL(A$) = 2 THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO SINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO SINE
ELSE
C = ASIN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ARC" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO SINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO SINE
ELSE
C = ASIN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "A" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO SINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO SINE
ELSE
C = ASIN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ASIN" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO SINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO SINE
ELSE
C = ASIN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ARC-SINE" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO SINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO SINE
ELSE
C = ASIN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE
CLW
PRINT "ERROR!"
END IF
GOTO MODE
COSINE:
PRINT "COSINE OR ARC-COSINE?"
INPUT A$
IF A$ = "C" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = COS(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "COS" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = COS(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "COSINE" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = COS(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF VAL(A$) = 1 THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = COS(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF VAL(A$) = 2 THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO COSINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO COSINE
ELSE
C = ACOS(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "A" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO COSINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO COSINE
ELSE
C = ACOS(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ARC" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO COSINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO COSINE
ELSE
C = ACOS(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ACOS" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO COSINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO COSINE
ELSE
C = ACOS(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ARC-COSINE" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO COSINE
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO COSINE
ELSE
C = ACOS(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE
CLW
PRINT "ERROR!"
END IF
GOTO MODE
TANGENT:
PRINT "TANGENT OR ARC-TANGENT?"
INPUT A$
IF A$ = "T" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = TAN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "TAN" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = TAN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "TANGENT" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = TAN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF VAL(A$) = 1 THEN
PRINT "INPUT X (RADIANS)"
INPUT X
C = TAN(X)
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF VAL(A$) = 2 THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO TANGENT
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO TANGENT
ELSE
C = ATAN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "A" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO TANGENT
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO TANGENT
ELSE
C = ATAN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ARC" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO TANGENT
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO TANGENT
ELSE
C = ATAN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ATAN" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO TANGENT
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO TANGENT
ELSE
C = ATAN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE IF A$ = "ARC-TANGENT" THEN
PRINT "INPUT X (RADIANS)"
INPUT X
IF X > 1 THEN
CLW
PRINT "ERROR!(INPUT TOO LARGE)"
GOTO TANGENT
ELSE IF X < -1 THEN
CLW
PRINT "ERROR!(INPUT TOO SMALL)"
GOTO TANGENT
ELSE
C = ATAN(X)
END IF
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
PRINT "CLEAR OUTPUT?"
INPUT Z$
IF Z$ = "YES" THEN
CLW
ELSE IF Z$ = "Y" THEN
CLW
ELSE IF VAL(Z$) = 1 THEN
CLW
ELSE IF Z$ = "NO" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF Z$ = "N" THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
ELSE IF VAL(Z$) = 0 THEN
CLW
PRINT "ANSWER:";C;" RADIANS"
PRINT ""
END IF
ELSE
CLW
PRINT "ERROR!"
END IF
GOTO MODE