Dec 10, 2011 at 2:57am UTC
Could you copy and paste the compiler errors and include which line numbers they are on?
Last edited on Dec 10, 2011 at 2:57am UTC
Dec 10, 2011 at 3:10am UTC
There is not error. It's just not giving me what I want :)
If you want to compile it and see the result, here is the code without line numbers:
#include <iostream>
#include <cfloat>
#include <cmath>
#include <cstdlib>
using namespace std;
const double P=3.1416;
int radius(int x1, int x2, int y1, int y2);
int circumfrence(int x1, int x2, int y1, int y2);
int area(int x1, int x2, int y1, int y2);
int main()
{
int x1,x2,y1,y2;
cout <<"Enter x1 : ";
cin >> x1;
cout << endl;
cout << "Enter y1 : ";
cin >> y1;
cout << endl;
cout << "Enter x2 : " ;
cin >> x2;
cout << endl;
cout << "Enter y2 : " ;
cin >> y2;
cout << endl;
cout << radius(x1,y1,x2,y2);
return 0;
}
int radius(int x1, int x2, int y1, int y2)
{
int Distance;
long double x=(( x2 - x1)^2) +(( y2 - y1)^2);
Distance = sqrt(x);
cout << Distance << endl;
}
double circumfrence(int Distance)
{
cout << 2*P*Distance << endl;
}
double area(int Distance)
{
cout << P*((Distance)^2)<< endl;
return main();
}