Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- double x,t,y;
- scanf("%lf", &x);
- if(x>1)
- {
- t = tan(x*x-1);
- if (t<0)
- {
- printf("ERROR\n");
- return 0;
- }
- else y = sqrt(t);
- }
- else if (x<0) y=exp(cos(x));
- else y = -2*x;
- printf("%.6lf",y);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement