![](https://cos-cdn.shuashuati.com/pipixue-web/2020-1231-2005-12/ti_inject-812ce.png)
编写函数fun计算下列分段函数的值: x^2+x+6 x<0 且x≠-3 f(x)= x^2-5x+6 0≤x<10 且x≠2及x≠3 x^2-x-1 其它 函数fun返回求出的值。 注意:部分源程序给出如下。 请勿改动main函数和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。 ------------------------------------------------*/ #include
float fun(float x) { /**********Program**********/ /********** End **********/ } int main() { float x,f; printf("input x="); scanf("%f",&x); f=fun(x); printf("x=%f,f(x)=%f\n",x,f); return 0; }