//layan zuhair
// U00038258
#include<iostream>
#include<cmath>
usingnamespace std;
double rad(double l1, double z1, double l2, double z2)
{
double rad;
rad = sqrt(pow(l2 - l1,2) + pow(z2 - z1,2));
return rad ;
}
double area(double rad)
{
double area;
double r;
cout << "The circle's circumference is:" << 2*3.142*r<< endl;
area = 3.142*pow(rad,2);
return area;
}
int main ()
{
double lcent , zcent ; // (l,z) values fo rthe center of the circle
double lpoint , zpoint ; // (l,z) values for a point on the circle
double r;
cout << "Enter the coordinates of the center of the circle : ";
cin >> lcent >> zcent ;
cout << "Enter the coordinates of one point on the cirlce : ";
cin >> lpoint >> zpoint ;
r = rad(lcent, zcent, lpoint , zpoint); //we called the function rad and assigned r to it so we can use the radius in the area function
cout << "The circle's radius:" << r<< endl ;
cout << "The circle's area is:" << area(r) ;
return 0;
}