Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <stack>
- #include <fstream>
- #include <algorithm>
- using namespace std;
- class Point {
- private:
- double x, y;
- public:
- Point(double _x = 1.0, double _y = 1.0) {
- x = _x;
- y = _y;
- }
- double get_x() const {
- return x;
- }
- double get_y() const {
- return y;
- }
- };
- int main()
- {
- double x, y;
- cin >> x >> y;
- Point p(x, y);
- cout << p.get_x() << " " << p.get_y() << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement