Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class point
- {
- private:
- float x,y,len;
- public:
- stand ()
- {
- this->x=0;
- this->y=0;
- }
- read (float X, float Y)
- {
- cout << "Введите абсциссу точки" << endl;
- cin << X;
- cout << "Введите ординату точки" << endl;
- cin << Y;
- }
- compare (float len)
- {
- len=sqrt(sqr(X-x)+sqr(Y-y))
- cout << len << endl;
- }
- };
- int main()
- {
- point :: read (float X, float Y);
- point :: stand ();
- point :: compare ();
- }
Add Comment
Please, Sign In to add comment