Advertisement
mostlabs

9/2

Jan 12th, 2020
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. double min(int a, int b)
  8.  
  9. {
  10.  
  11.     if (a > b)
  12.  
  13.     return b;
  14.     else
  15.     return a;
  16.  
  17. }
  18.  
  19. int main()
  20. {
  21.  
  22.      int a, b;
  23.  
  24.     cout << "Enter a, b" << endl;
  25.  
  26.       cin >> a >> b;
  27.  
  28.      double min1 = min(pow(a,3)-b , pow(b,2)+2);
  29.  
  30.      double min2 = min( (a * b) / (a + b) , pow(a,-b) );
  31.  
  32.         int d = min1 - min2;
  33.  
  34.      cout << d << endl;
  35.      
  36.      
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement