typedef struct{
	double x,y;
}vector;

vector initVector(double r,double theta){
	vector c;

	c.x = r*cos(theta);
	c.y = r*sin(theta);

	return c;
}

vector addVector(vector a,vector b){
	vector c;

	c.x = a.x + b.x;
	c.y = a.y + b.y;

	return c;
}

vector subtractVector(vector a,vector b){
	vector c;

	c.x = a.x - b.x;
	c.y = a.y - b.y;

	return c;
}

vector multiplyVector(vector a,double b){
	vector c;

	c.x = b*a.x;
	c.y = b*a.y;

	return c;
}

vector divideVector(vector a,double b){
	vector c;

	c.x = a.x/b;
	c.y = a.y/b;

	return c;
}

void printVector(vector a){
	printf(,a.x,140,(a.y>=0)?'+':'-',(a.y>=0)?a.y:fabs(a.y),150);
}

int main()
{
	vector a = initVector(3,pi/6);
	vector b = initVector(5,2*pi/3);

	printf();
	printVector(a);

	printf();
	printVector(b);

	printf();
	printVector(addVector(a,b));

	printf();
	printVector(subtractVector(a,b));

	printf();
	printVector(multiplyVector(a,3));

	printf();
	printVector(divideVector(b,2.5));

	return 0;
}