输入-9显示-1.#J

要求:从键盘上输入一个双精度实数x。

输出y的值,结果保留2位有效数字,最后换行。

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

pow函数第二个参数,不支持浮点型
你改为3试试