Advertisement
huutho_96

Untitled

Mar 21st, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int min(int a, int b){ return (a > b) ? b : a; }
  6. int max(int a, int b){ return (a > b) ? a : b; }
  7. int main()
  8. {
  9. int a, b, c, d;
  10. cin >> a >> b >> c >> d;
  11. cout
  12. << "\t" << min(min(a, b), min(c, d))
  13. << "\t" << min(max(min(a, b), min(c, d)), min(max(a, b), max(c, d)))
  14. << "\t" << max(max(min(a, b), min(c, d)), min(max(a, b), max(c, d)))
  15. << "\t" << max(max(a, b), max(c, d));
  16. system("pause");
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement