Community QBasic

Rebooting the QBasic we all know and love!


Project maintained by Cory Smith

TAN

Returns the tangent of the specified angle.

Syntax

TAN(angle)

Comments

angle is a numeric expression that specifies an angle in radians.

You can express an angle in radians or degrees. The QBasic trigonometric routines support only radians. To convert from degrees to radians, use the following equation:

radians = 3.141593 * (degrees/180)

Example

pi = 3.141593
PRINT TAN(pi / 4)

See Also