#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b,c,d,e,x;
cin>>x>>a>>b>>c>>d;
e=a*x*x*x+b*x*x+c*x+d;
printf("%.7lf",e);
return 0;
}
1012:计算多项式的值
于 2022-03-11 12:10:22 首次发布
#include<bits/stdc++.h>
using namespace std;
int main()
{
double a,b,c,d,e,x;
cin>>x>>a>>b>>c>>d;
e=a*x*x*x+b*x*x+c*x+d;
printf("%.7lf",e);
return 0;
}