Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:11:12: error: expected ')' before ';' token
  if(int i=1;i<=n;i++)
            ^
/in/foo.cc:11:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  if(int i=1;i<=n;i++)
  ^~
/in/foo.cc:11:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
  if(int i=1;i<=n;i++)
             ^
/in/foo.cc:11:9: warning: unused variable 'i' [-Wunused-variable]
  if(int i=1;i<=n;i++)
         ^
/in/foo.cc:11:13: error: 'i' was not declared in this scope
  if(int i=1;i<=n;i++)
             ^

信息

递交者
类型
递交
题目
P1630 A2-3 循环结构入门:斐波拉契数列的和
语言
C++
递交时间
2024-08-20 19:49:00
评测时间
2024-08-20 19:49:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes