Advertisement
kirya_shkolnik

с++ - Никита - 2

Jan 22nd, 2021
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5. double Razv(double x){
  6.     double p;
  7.     if(x<0){
  8.         p = log10(pow(x,2));
  9.         double temp = exp(-2*x);
  10.         double temp1 = sin(2*x);
  11.         double temp2 = abs(x);
  12.         if(temp < p) p = temp;
  13.         if(temp1 < p) p = temp1;
  14.         if(temp2 < p) p = temp2;
  15.     }
  16.     if(x>=0 && x <1.5){
  17.         p = pow(cos(x),3);
  18.         double temp = sqrt(5*x);
  19.         double temp1 = pow(x,2);
  20.         if(temp > p ) p =temp;
  21.         if(temp1 > p ) p =temp1;
  22.        
  23.     }
  24.     if(x>=1.5){
  25.         p = sin(x-1);
  26.     }
  27.     return p;
  28. }
  29. int main()
  30. {
  31.     double x;
  32.     cin >> x;
  33.     cout << Razv(x);
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement