artemgf

Странная процедура

May 7th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #define _USE_MATH_DEFINES
  2. #include <iostream>
  3. #include <conio.h>
  4. #include <string>
  5. #include <set>
  6. #include <map>
  7. #include <algorithm>
  8. #include <string>
  9. #include <math.h>
  10. #include <vector>
  11. #include <cmath>
  12. #include <sstream>
  13.  
  14. using namespace std;
  15.  
  16. int main()
  17. {
  18.     long a, b;
  19.  
  20.     scanf_s("%d %d", &a, &b);
  21.  
  22.     if ((a % 2) != (b % 2) && a > 0 && b > 0)
  23.         cout << b << " " << a;
  24.     else
  25.         cout << a << " " << b;
  26.     _getch();
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment