#include <math.h> double length, angle; double vector[2]; . . . length =some valueangle =some number of degreesvector[0] = length * cos( angle*M_PI/180.0 ) vector[1] = length * sin( angle*M_PI/180.0 )

Recall the steps to take in converting a vector given as length and direction into (x,y):

- Draw a sketch.
- Calculate x by projecting the length onto the x-axis: usually length*cos( θ )
- Calculate y by projecting the length onto the y-axis: usually length*sin( θ )
- Check answers against the sketch.

The steps are the same (of course) if the angle is given in radians.

A vector is 4.5 units long oriented at 0.70 radians.
Express the vector as ( x, y )^{T}.