Advertisement
MadCortez

Untitled

Oct 3rd, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int min(int a, int b) {
  4.     if (a > b)
  5.         return b;
  6.     else
  7.         return a;
  8. }
  9. int max(int a, int b) {
  10.     if (a > b)
  11.         return a;
  12.     else
  13.         return b;
  14. }
  15. int main()
  16. {
  17.     int a, b, c, d;
  18.     std::cin >> a >> b >> c >> d;
  19.     std::cout << min(max(a, b), max(a, b));
  20. }
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement