Returns the cosine of the specified angle.

`COS`

(*angle*)

*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)

```
angle = .785
PRINT "Cosine of"; angle; "is"; COS(angle)
```

```
Cosine of .785 is .7073882
```

```
PI=3.141593
PRINT COS(PI)
DEGREES=180
RADIANS=DEGREES*PI/180
PRINT COS(RADIANS)
```

```
-1
-1
```