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