#include<iostream.h>
#define PI 3.14159
class Circle
{
private:
float radius,girth,area;
public:
Circle(float r=0);
Circle(Circle &c);
void input();//输入半径
void jisuan();//计算周长、面积
void output();//输出半径、周长和面积
};
Circle::Circle(float r)
{
radius=r;
}
Circle::Circle(Circle &c)
{
radius=c.radius;
}
void Circle::input()
{
cout<<"输入圆的半径:";
cin>>radius;
}
void Circle::jisuan()
{
girth=2*PI*radius;
area=PI*radius*radius;
}
void Circle::output()
{
cout<<"圆的半径:"<<radius<<endl;
cout<<"圆的周长:"<<girth<<endl;
cout<<"圆的面积:"<<area<<endl;
}
void main()
{
Circle c1;
Circle c2(c1);
c1.input();
c1.jisuan();
c1.output();
c2.input();
c2.jisuan();
c2.output();
}