Gerontological Nurse Ventures
*Home>>>Nursing Program

C++ Cartesian plane for a circle.what's value for center?


Need to write a program that prompts user to enter the center and a point on a circle. What is or are the value for center in a Cartesian plane. If someone could write the code that I need for this problem I am even willing to pay a little cash it is taking me too much time and I as a nurse I very little time on my hands. If you can help for free with a little help, and or the whole code I will $$. Please do get back as soon as possible.

#include <iostream>
#include <math>

#define PI 3.14

int main()
{

double xc, yc,xp,yp;

cout << "Please enter the X coordinate of center: " << endl;
cin >> xc;
cout << "Please enter the Y coordinate of center: " << endl;
cin >> yc;

cout << "Please enter the X coordinate of point: " << endl;
cin >> xp;
cout << "Please enter the Y coordinate of point: " << endl;
cin >> yp;

double radius = sqrt(pow(xp- xc , 2.0) +
pow(yc - yp, 2.0));

double diameter = 2*radius;
double circumference = diameter*PI;
double area = PI*pow(radius, 2.0);

cout << "radius = " << radius << " diameter = " << diameter << " circumference = " << circumference << "area = " << area << endl;



}

yes its right but the me depends on the radius of the circle. In C++ the formula of a circle is circle(x,y,radius); and use to define this by using #include(stdio.h); thanks - walterdom apaga Report It

Tags
  Care Planning   Nursing Research   Nursing Program   Nursing Process   Nursing Practice   Nursing Management   Nursing Info   Nursing Clinic   Nursing Care
Related information
  • Why hasn't someone come up with software for new moms?

    you can be the first and make some money.

    ...
  • Actual Nanny State: NYC Bans Baby Bottles?

    They're not telling women they CAN'T bottle feed. All they're doing is encouraging breastfeeding. Which they should - because they're a HOSPITAL and it's healthier for th...

  • Celebrity reality TV programs going to the extreme now?

    hello there, i completely agree with you about the worn out idea of reality tv shows, it was interesting when the first one popped out,but now televisions make reality shows about everything that...

  • What is the title of this young adult science fiction book I read when I was young?

    Jennies, if no one comes up with the title here you can always give the following website a try: ...

  • What 'income supports' are available for pregnant women/young single & broke parents/etc in Canada?

    I had a single mother friend with a 2-year-old several years ago. She had no job, but wisely decided to take some college courses. The Canadian/Provincial government paid for the school and the...

  • Animal Starvation and Nothing You Can Do About It..?

    I hear you. I know of several local Animal Shelters like the one you are describing. The sad fact is there is no law that prevents this. The only beings that can prevent these horrible facts a...

  • Did you know that ticks have venom?

    Its not so much venom, but they do secrete an anasthetic so you won't feel the puncture wound they make. The sickness comes from spyroketes in the blood the tick shares with you while it feeds...

  • I just lost ten pounds in one week...they say that it's not healthy...?

    Usuallly when you have a lot of weight to lose (me, lol), you tend to lose mostly water in the beginning. Its not unhealthy as long as you are replacing the water. The best thing you can do for a d...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster