Advertisement
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 p;
- if(x<0){
- p = log10(pow(x,2));
- double temp = exp(-2*x);
- double temp1 = sin(2*x);
- double temp2 = abs(x);
- if(temp < p) p = temp;
- if(temp1 < p) p = temp1;
- if(temp2 < p) p = temp2;
- }
- if(x>=0 && x <1.5){
- p = pow(cos(x),3);
- double temp = sqrt(5*x);
- double temp1 = pow(x,2);
- if(temp > p ) p =temp;
- if(temp1 > p ) p =temp1;
- }
- if(x>=1.5){
- p = sin(x-1);
- }
- return p;
- }
- int main()
- {
- double x;
- cin >> x;
- cout << Razv(x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement