Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Point {
- public:
- int x;
- int y;
- void soberi(int x_tmp, int y_tmp) {
- x += x_tmp;
- y += y_tmp;
- }
- };
- int main() {
- Point p;
- cin >> p.x >> p.y;
- p.soberi(4, 5);
- cout << p.x << " " << p.y << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement