下列程序中,fun( )函数的功能是计算x2-2x+6,主函数中将调用fun(
问题:
下列程序中,fun( )函数的功能是计算x2-2x+6,主函数中将调用fun( )函数计算。
y1=(x+8)2-2(x+8)+6
y2=sin2(x)-2sin(x)+6
请填空
#include "math.h"
double fun(double x)return(x*x-2*x+6);)
main()
double x,y1,y2;
printf("enter x:");scanf("%1f",&x);
y1=fun(______);
y2=fun(______);
printf("y1=%1f,y2=%1f\n",y1,y2);