#include
class Circle
{
public:
Circle():radius(0){}
Circle(double r):radius(r){}
const double area() const
{
return M_PI * radius * radius;
}
const double perimeter() const
{
return 2 * M_PI * radius;
}
friend double area(Circle);
friend double perimeter(Circle);
private:
double radius;
};
double area(Circle c)
{
return M_PI * c.radius * c.radius;
}
double perimeter(Circle c)
{
return 2 * M_PI * c.radius;
}