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

 

相关文章:

  • 2021-09-12
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案