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