Advertisement
Josif_tepe

Untitled

Mar 22nd, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <stack>
  4. #include <fstream>
  5. #include <algorithm>
  6.  
  7. using namespace std;
  8.  
  9. class Point {
  10. private:
  11.     double x, y;
  12. public:
  13.     Point(double _x = 1.0, double _y = 1.0) {
  14.         x = _x;
  15.         y = _y;
  16.     }
  17.     double get_x() const {
  18.         return x;
  19.     }
  20.     double get_y() const {
  21.         return y;
  22.     }
  23. };
  24. int main()
  25. {
  26.     double x, y;
  27.     cin >> x >> y;
  28.     Point p(x, y);
  29.     cout << p.get_x() << " " << p.get_y() << endl;
  30.     return 0;
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement