| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65385 | 万诗烨 | 06计算f(x)的值 | C++ | Compile Error | 0 MS | 0 KB | 191 | 2024-01-25 11:21:04 |
#include<bits/stdc++.h> using namespace std; int main() { double x,a,b,c,d; scanf ("%lf%lf%lf%lf%lf",&x,&a,&b,&c,&d); printf f=a*x*x*x+b*x*x+c*x+d; cout ("%.5lf",f) return 0; }
Main.cc: In function 'int main()':
Main.cc:6:9: error: expected ';' before 'f'
printf f=a*x*x*x+b*x*x+c*x+d;
^
Main.cc:6:30: warning: statement is a reference, not call, to function 'printf' [-Waddress]
printf f=a*x*x*x+b*x*x+c*x+d;
^
Main.cc:6:30: warning: statement has no effect [-Wunused-value]
Main.cc:7:16: error: 'f' was not declared in this scope
cout ("%.5lf",f)
^
Main.cc:5:42: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%lf%lf%lf%lf%lf",&x,&a,&b,&c,&d);
^