Advertisement
JosepRivaille

X54725: Mínim de dos enters

Feb 22nd, 2015
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. //Precondició: Llegeix dos enters
  5. //Postcondició: En retorna el mínim
  6.  
  7. int main() {
  8.     int x, y;
  9.     cin >> x >> y;
  10.     if (x-y >= 0) cout << y << endl;
  11.     else cout << x << endl;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement