itsme86 - thank you for the clarification. I can now get the code to actually run... kinda lol

when I go to debug the console actually comes up and askes me to put in a center point, then it hangs. Have to close out the console window but have no errors to try and figure out what the issues is.

here is my improved code (thanks to all of you)

Code:

//***************************************
//* CISP231: C++ Programming I *
//*Programming Exercises Chapter 6 #6 *
//*Instructor: Dr. Loay Alnaji *
//*Created By: Jennifer Tichelaar *
//*Date Created: Jan 19, 2011 *
//***************************************
#include <iostream>
#include <cmath>
using namespace std;
double distance (double x1, double y1, double x2, double y2) //function to figure out the distance
{
double dx = x2 - x1;
double dy = y2 - y1;
double dsquared = dx*dx + dy*dy;
double result = sqrt (dsquared);
return result;
}
double radius (double x1, double y1, double x2, double y2) //function to figure out the radius
{
double radius = distance (x1, y1, x2, y2);
return radius;
}
double circumference(double radius) //function to figure out the circumference
{
double circumference = 3.1416 * (radius * 2);
return circumference;
}
double area(double radius) //function to figure out the area
{
double area = 3.1416 * radius * radius;
return area;
}
double diameter(double radius) //function to figure out the diameter
{
double diameter = 2 * radius;
return diameter;
}
int main()
{
double x1; //variable to store the center point of the circle
double x2; //variable to store the second point on the circle
double y1; //variable to store the center point of the circle
double y2; //variable to store the second point on the circle
cout <<"Enter a center point: ";
cin >> x1 >> y1;
cout <<"Enter a point on the circle: ";
cin >> x2 >> y2;
cout <<"The distance of the circle is: "
<< distance(x1, y1, x2, y2)
<< endl;
//area return
cout <<"The area of the circle is: "
<< area(radius(x1, y1, x2, y2)) << endl;
//radius return
cout <<"The radius of the circle is: "
<< radius(x1, y1, x2, y2) << endl;
//circumference return
cout <<"The circumference of the circle is: "
<< circumference(radius(x1, y1, x2, y2)) << endl;
//diameter
cout <<"The diameter of the circle is: "
<< diameter(radius(x1, y1, x2, y2)) << endl;
return 0;
}