#include #include using namespace std; class Kreis { public: static constexpr double pi = acos(-1.0); private: double r; public: Kreis(double r_ = 1): r(r_) {} double radius() { return r; } double umfang() { return 2*r*pi; } static double flaeche(Kreis k) { return pi*k.r*k.r; } double zylinder(double h) { return h * flaeche(*this); } }; int main() { Kreis k{0.5}; cout << "Radius: " << k.radius() << endl << "Umfang: " << k.umfang() << endl << "Flaeche: " << Kreis::flaeche(k) << endl << "Zylindervol.: " << k.zylinder(2) << endl; return 0; }