- shilinhan's blog
计算多项式的值
- 2024-2-19 15:00:43 @
#include <bits/stdc++.h>
using namespace std;
int main() {
// 1. define
double x, a, b, c, d;
// 2. input
cin >> x >> a >> b >> c >> d;
// 3. process
double ans = a * x * x * x + b * x * x + c * x + d;
// 4. output
cout << fixed << setprecision(7) << ans << endl;
return 0;
}