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>
- main() {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- float a, b, x, z, stepen_e, stepen_x_2;
- char Error_text[] = "NET resheniay";
- printf("Vvedite a: ");
- scanf("%f",&a);
- printf("Vvedite b: ");
- scanf("%f",&b);
- printf("Vvedite x: ");
- scanf("%f",&x);
- if (x<=a) {
- printf("esly x<=a ");
- ///////////////<vihod>
- if ((x<=a)&&(x<0)) {
- printf("%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)) {
- printf("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) {
- printf("esly x >= b ");
- ///////////////<vihod>
- if ((x>=b)&&(x>=1)) {
- printf("%s. 2",Error_text);
- exit(0);
- } else if ((x>=b)&&(x<0)) {
- printf("%s. 3",Error_text);
- exit(0);
- }
- ///////////////</vihod>
- z=fabs(sin(x)-0.11)*acos(x) + pow(x, asin(x));
- }
- printf("REZULTAT z = %f\n",z);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement