记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:2: error: expected ';' before 'scanf'
  scanf("%d%d",&k1,&k2);
  ^~~~~
/in/foo.cc:8:20: error: expected ')' before ';' token
  for(i=0;i<k1-1;i++;)
                    ^
/in/foo.cc:8:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(i=0;i<k1-1;i++;)
  ^~~
/in/foo.cc:8:21: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  for(i=0;i<k1-1;i++;)
                     ^
/in/foo.cc:8:21: error: expected primary-expression before ')' token
/in/foo.cc:14:21: error: expected ')' before ';' token
  for(i=k1;i<k2-1;i++;)
                     ^
/in/foo.cc:14:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
  for(i=k1;i<k2-1;i++;)
  ^~~
/in/foo.cc:14:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
  for(i=k1;i<k2-1;i++;)
                      ^
/in/foo.cc:14:22: error: expected primary-expression before ')' token
/in/foo.cc:5:17: warning: unused variable 'c' [-Wunused-variable]
     int a=1,b=1,c=0,d=0,i,k1,k2;
                 ^

信息

递交者
类型
递交
题目
1-2 斐波那契数列的和
语言
C++
递交时间
2019-03-31 15:48:10
评测时间
2019-03-31 15:48:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes