Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- double Razv(double x){
- double t;
- if(x>0 and x<10){
- t = x*x;
- double temp = exp(-x);
- double temp1 = sin(x*x);
- double temp2 = log(x);
- if(temp < t) t = temp;
- if(temp1 < t) t = temp1;
- if(temp2 < t) t = temp2;
- }
- if(x<=0){
- t = sqrt(abs(x));
- double temp = cos(x)*cos(x)*cos(x);
- double temp1 = sin(x*x*x);
- double temp2 = pow(2*x,1.0/3.0);
- if(temp < t ) t =temp;
- if(temp1 < t ) t =temp1;
- if(temp2 < t ) t =temp1;
- }
- if(x>=10){
- t = 10;
- }
- return t;
- }
- int main()
- {
- double x;
- cin >> x;
- double t = Razv(x);
- cout << t;
- return 0;
- }
Add Comment
Please, Sign In to add comment