Guest User

Untitled

a guest
Dec 26th, 2017
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. class point
  4. {
  5.     private:
  6.     float x,y,len;
  7.     public:
  8.     stand ()
  9.     {
  10.     this->x=0;
  11.     this->y=0;
  12.     }
  13.     read (float X, float Y)
  14.     {
  15.         cout << "Введите абсциссу точки" << endl;
  16.        cin << X;
  17.        cout << "Введите ординату точки" << endl;
  18.        cin << Y;
  19.    }
  20.    compare (float len)
  21.    {
  22.        len=sqrt(sqr(X-x)+sqr(Y-y))
  23.        cout << len << endl;
  24.    }
  25. };
  26.  
  27. int main()
  28. {
  29. point :: read (float X, float Y);
  30. point :: stand ();
  31. point :: compare ();
  32. }
Add Comment
Please, Sign In to add comment