Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- class numbers
- {
- private:
- int x;
- int y;
- public:
- int get_x(){return x;}
- int get_y(){return y;}
- bool get_equal(){return false;}
- numbers(){cin >> x >> y;}
- numbers operator + (numbers comparison)
- {
- int flag;
- if (x > y && x != y)
- get_y();
- else if (x < y && x != y)
- get_x();
- else
- get_equal();
- }
- };
- int main()
- {
- int min;
- numbers numbers_;
- printf("%d", numbers_ + numbers_);
- return 0;
- }
Add Comment
Please, Sign In to add comment