| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 | 
|---|---|---|---|---|---|---|---|---|
| 135361 | ggh | 06计算f(x)的值 | C++ | Compile Error | 0 MS | 0 KB | 376 | 2025-11-03 17:05:02 | 
#include <iomanip> #include <cmath> using namespace std; int main() { double x, a, b, c, d; // 读取输入参数 cin >> x >> a >> b >> c >> d; // 计算多项式值: f(x) = a*x^3 + b*x^2 + c*x + d double result = a * pow(x, 3) + b * pow(x, 2) + c * x + d; // 设置输出精度为小数点后5位 cout << fixed << s
Main.cc: In function 'int main()':
Main.cc:10:5: error: 'cin' was not declared in this scope
     cin >> x >> a >> b >> c >> d;
     ^
Main.cc:16:5: error: 'cout' was not declared in this scope
     cout << fixed << s
     ^
Main.cc:16:22: error: 's' was not declared in this scope
     cout << fixed << s
                      ^
Main.cc:13:12: warning: unused variable 'result' [-Wunused-variable]
     double result = a * pow(x, 3) + b * pow(x, 2) + c * x + d;
            ^
Main.cc:16:22: error: expected '}' at end of input
     cout << fixed << s
                      ^