#include <iostream.h>	// cin, cout
class punkt2D{
      private:
              float x,y;
      public:
             char symbol;
             inline void wyswietl();
             void inic();
             punkt2D();
             float dodaj();
};
punkt2D::punkt2D()
{
                x=0;
                y=0;
                symbol='2';
                cout<<"Uruchomiono konstruktor ;)"<<endl;
}

void punkt2D::wyswietl()
{
	cout << "Punkt: "<< symbol<< " dlugosc = " << x << ", szerokosc = " << y << endl;
}

void punkt2D::inic()
{
     x=rand();
     y=rand();
}

float punkt2D::dodaj()
{
     return x+y;
}

main()
{
	srand(time(NULL)); //inicjalizacja generatora liczb losowych
    punkt2D p1; // konstuktor bezparametrowy
	p1.wyswietl();
	cout<<p1.dodaj()<<endl;
	p1.inic();
	p1.wyswietl();
	cout<<p1.dodaj();
	system("pause>nul");
	return 0;
}
