Advertisement
kirya_shkolnik

Зимовец - 2

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