jugal_panchal schrieb am Mo, 10.11.2008: > I'm trying to make a program about polar problem > as following but it doesn't give right answer I > think problem in formula this is right if yes > then what should be changes are made.plz send > urgent reply
I'm not a native speaker of English (and you don't seem to be one either), but still, *please* spell out your words, be grammatically correct, and use correct punctuation and spelling -- unless you want to look like a semi-literate boob. And don't flag your question as “Urgent”, even if it is for you. <http://www.catb.org/~esr/faqs/smart-questions.html#urgent> > #include<iostream.h> > #include<conio.h> Note that these are non-standard libraries. <snip> > Polar(Rectangle &R) > { > a=atan(R.getX()/R.getY());//a=atan(x/y); > r=sqrt(R.getX()*R.getX()+R.getY()*R.getY());//r=sqrt > (x*x+y*y); > } 1. If 'a' is the angle between the vector and the abscissa, 'x' the abscissa and 'y' the ordenate, the correct expression is: a = atan(y/x). <http://en.wikipedia.org/wiki/Polar_coordinate_system#Converting_between_polar_and_Cartesian_coordinates> 2. What if the vector is parallel to the ordinate axis? <snip> HTH Ignacio
