Skip to main content
GameDev.net gamedev.net
🔒 Locked

NEED HELP

Started by oceangirl2012 Oct 17, 2005 at 10:25 PM 0 replies 350+ views
Original Post
oceangirl2012
oceangirl2012
Hi guys i was just wondering if you could help me with my C++ program i am writing. The start of the program goes like this: °int main () { cout << " This program will help convert a Polar Co-ordinate into a cartesian Co-ordinate! "; return 0; } int main () { cout << " First we have to enter the values of our Polar Co-ordinate in the following form (r,θ) With our distance first and our angle second ! "; return 0; } // i/o example #include int main () { int i; cout << "Please enter the r value (long side of the triangle) of the Polar Coordinate : "; cin >> i; cout << "The value you entered is " << i; .\n"; return 0; // i/o example #include int main () { int i; cout << "Please enter the θ value(angle) of the Polar Coordinate. Note: the angle must be between 0° and 360° : "; cin >> i; cout << "The value you entered is " << i; .\n"; return 0; and i was wondering how i could write a line that says: You have entered the following Polar Co-ordinate (r,θ) which lists the distance (r) and the angle (θ) they have entered. It would be great if you guys have any ideas. Cheers and Thanks
Sneftel
Sneftel
We don't allow homework questions here, at least in this form. I suggest that you read up on trigonometry; converting between rectangular and polar coordinates uses common and well-known formulae.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.