2008
10-09

#include <iostream.h>


const float PI=(float)3.14159;
class Circle
{
public:
 Circle(float r);
 float Area();
private:
 float radius;
};
Circle::Circle(float r){radius=r;}
float Circle::Area()
{
 return PI * radius * radius;
}
void main()
{
 float radius;
 float c;
 cin>>radius;
 Circle Pool(radius);


 cout<<”the result is “<<Area()<<endl;
}


这是C++程序


请各位看看哪里出错了



留下一个回复