“21天好习惯”第一期-3
#include<stdio.h>
#include<math.h>
int main()
{
double x,a,b,c,d,q;
scanf("%lf %lf %lf %lf %lf",&x,&a,&b,&c,&d);
q=apow(x,3)+bpow(x,2)+c*x+d;
printf("%.7lf",q);
return 0;
}
f(x)=ax3+bx2+cx+d 和给定的a, b, c, d, x,计算f(x)的值(结果保留七位小数)