定义一个圆类circle,有数据成员半径(double)
定义一个圆类circle,有数据成员半径(double)
日期:2014-05-26 08:15:11 人气:1
#include
using namespace std;
class circle{
private:
double radius;
public:
circle(double r=0.0);
void input();
double c();
double s();
};
circle ::circle (double r)
{ radius =r;
}
void circle::input()
{ cout<<"请输入半径:"