Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
70468 陈俊洁 13自由落体 C++ Compile Error 0 MS 0 KB 175 2024-04-14 14:54:19

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main () { double h,sum=0; cin>>n; for(int i=2;i<=10;i++){ h=h/2.0; sum=sum+2*h; } printf("%.6lf %.6lf",sum,h); }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:6: error: 'n' was not declared in this scope
 cin>>n;
      ^