Problem1074--复杂的分段函数

1074: 复杂的分段函数

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 14  Solved: 8
[Submit] [Status] [Web Board] [Creator:]

Description

编程,输入n后:输入n个数,根据下式计算并输出y值。

      x2-sinx    x<-2

y=  2x+x       -2<=x<=2

         ___________

      √  X2+X+1                  x>2

* 输出保留两位小数

  

程序的框架如下:

int main()
{
    int i,n;
    double x,y;
    scanf("%d",&n);
    for(i=1; i<=n; i++) {
        scanf("%lf",&x);


        printf("%.2lf\n",y);
    }
    return 0;
}

Input

n

n个数

Output

这n个数对应的y值

Sample Input

3
1
2
4

Sample Output

3.00
6.00
4.58