All pastes #913223 Raw Edit

Untitled

public cpp v1 · immutable
·published 2008-02-21 22:09 UTC
rendered paste body
#include <iostream>#include <cmath>using namespace std;int main(){	int a;	cout << "For Polar to Rectangular press 1. \nFor Rectangular to Polar press 2.\n ";	cin >> a;	if (a = 1)	{		double r, theta, x_solved, y_solved;		cout << "r value? ";		cin >> r;		cout << "theta value? ";		cin >> theta;		x_solved = r*cos(theta);		y_solved = r*sin(theta);		cout<<"The coordinates are ("<<x_solved<<","<<y_solved<<")";	}return 0;}