Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- int main()
- {
- double x, y, s, boof1, boof2;
- int function;
- std::cin >> x >> y; std::cout << std::endl;
- std::cout << "select your function 1 - sh(x), 2 - x^2, 3 - e^x" << std::endl;
- std::cin >> function;
- switch(function){
- case 1:boof1 = sinh(x); break;
- case 2:boof1 = pow(x, 2); break;
- case 3:boof1 = exp(x); break;
- default: std::cout <<"error"<< std::endl;
- return 0;
- }
- boof2=x*y;
- if(0.5 < x*y && x*y < 10)
- s = exp(boof2-fabs(y));
- else if(0.1 < boof2 && boof2 < 0.5)
- s = pow(boof2 + y, 1.0/0.3);
- else
- s=2*pow(boof2, 2);
- std::cout << s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement