#include<stdio.h> #include<math.h> int main() { double x,y; printf("Enter x:"); scanf("%lf",&x); if(x<-2){ y=x*x; } else if(x>2){ y=sqrt (double(x*x+x+1)); } else{ y=x+2; } printf("f(%.2f)=%.2f\n",x,y); return 0; }