#include<iostream>
#include<iomanip>
#define PIE 3.14
using namespace std;
class Cylinder
{
double radius;
double height;
public:
Cylinder(double r = 1, double h = 1) :radius(r), height(h)
{
}
void volume()
{
double v = PIE * radius * radius * height;
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
cout << v << endl;
}
void setRadius(double r)
{
radius = r;
}
void setHeight(double h)
{
height = h;
}
double getRadius()
{
return radius;
}
double getHeight()
{
return height;
}
};
//StudybarCommentBegin
int main()
{
double radius, height;
// cout<<"Please input the radius of cylinder:";
cin >> radius;
// cout<<"Please input the height of cylinder:";
cin >> height;
Cylinder first(radius, height);
first.volume();
cout << "The volume of Cylinder with default data:" << endl;
Cylinder second;
second.volume();
return 0;
}
//StudybarCommentEnd