SHARE
TWEET

eMINMAX

STANAANDREY Dec 11th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. float mini(float x, float y)
  5. {
  6.     if (x > y)
  7.         return y;
  8.     return x;
  9. }
  10.  
  11. float maxi(float x, float y)
  12. {
  13.     if (x < y)
  14.         return y;
  15.     return x;
  16. }
  17.  
  18. float E(float x, float y)
  19. {
  20.     if (x * x + y * y >= 1)
  21.         return mini(x, y);
  22.     return maxi(x, y);
  23. }
  24.  
  25. int main()
  26. {
  27.     int x, y;
  28.     cin >> x >> y;
  29.     cout << E(x, y);
  30.     return 0;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top