Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a, b;
- cin >> a >> b;
- int num = 0;
- if (a > b) {
- cout << b << endl;
- cout << (a - b) / 2 << endl;
- }
- else {
- cout << b << endl;
- cout << (b - a) / 2 << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment