Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5904 谢锦卓 13自由落体 C++ Compile Error 0 MS 0 KB 291 2024-12-21 09:27:00

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() using namespace std; int main(){ double h=100; double n=100; for(int i=1;i<=10;i++){ h=h/2; n=n+(h*2); } cout<<fixed<<setprecision(6)<<n<<" "<<h<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:32: error: 'setprecision' was not declared in this scope
     cout<fixed<<setprecision(6)<<n<<" "<<h<<endl;
                                ^