Advertisement
Ritchie

Untitled

Sep 12th, 2014
835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. void main() {
  2.   int a1, b1, a2, b2, a3, b3;
  3.   cin >> a1 >> b1 >> a2 >> b2;
  4.   a3 = (a1>a2)?a1:a2;
  5.   b3 = (b1<b2)?b1:b2;
  6.  
  7.   if (a3 <= b3) cout << "[" << a3 << "," << b3 << "]";
  8.   else cout << "[]";
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement