Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>
- #include <math.h>
- #include <stdio.h>
- #include <windows.h>
- #include <iostream>
- main() {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- float a, b, x, z, stepen_e, stepen_x_2;
- char Error_text[] = "NET resheniay";
- std::cout <<"Vvedite a: ";
- std::cin >>a;
- std::cout <<"Vvedite b: ";
- std::cin >>b;
- std::cout <<"Vvedite x: ";
- std::cin >>x;
- if (x<=a) {
- std::cout <<"esly x<=a ";
- ///////////////<vihod>
- if ((x<=a)&&(x<0)) {
- std::cout <<"%s. 1",Error_text;
- exit(0);
- }
- ///////////////</vihod>
- z= log(pow(27,((float)1/3))+sqrt(x)+sin(x)+cos(x)); //pow(x,y) — x^y
- }
- else if ((a<x)&&(x<b)) {
- std::cout <<"esly a<x<b ";
- stepen_e=cosh(x)+tanh(x);
- stepen_x_2=pow(x,2);
- z= pow( (pow(tan(x),2)+1.3*exp(stepen_e)) , stepen_x_2);
- } else if (x >= b) {
- std::cout <<"esly x >= b ";
- ///////////////<vihod>
- if ((x>=b)&&(x>=1)) {
- std::cout <<"%s. 2",Error_text;
- exit(0);
- } else if ((x>=b)&&(x<0)) {
- std::cout <<"%s. 3",Error_text;
- exit(0);
- }
- ///////////////</vihod>
- z=fabs(sin(x)-0.11)*acos(x) + pow(x, asin(x));
- }
- std::cout <<"REZULTAT z = %f\n",z;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement