Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117158 施宸雨 12自由落体 C++ Compile Error 0 MS 0 KB 179 2025-04-13 20:19:19

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int n = 100; for (int i = 0;i < 10;i++){ n = n / 2; } double n; cout<<"%6.f",n; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:9: error: conflicting declaration 'double n'
  double n;
         ^
Main.cc:6:6: note: previous declaration as 'int n'
  int n = 100;
      ^
Main.cc:13:16: warning: right operand of comma operator has no effect [-Wunused-value]
  cout<<"%6.f",n;
                ^