记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:6:9: error: ‘cin’ was not declared in this scope
    6 |         cin>>n>>endl;
      |         ^~~
foo.cc:6:17: error: ‘endl’ was not declared in this scope
    6 |         cin>>n>>endl;
      |                 ^~~~
foo.cc:7:13: error: ‘inti’ was not declared in this scope; did you mean ‘int’?
    7 |         for(inti==1;i<=n;i++)
      |             ^~~~
      |             int
foo.cc:7:21: error: ‘i’ was not declared in this scope
    7 |         for(inti==1;i<=n;i++)
      |                     ^
foo.cc:7:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
    7 |         for(inti==1;i<=n;i++)
      |         ^~~
foo.cc:9:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
    9 |                 b=b+a;
      |                 ^
foo.cc:10:9: error: ‘cout’ was not declared in this scope
   10 |         cout<<b;
      |         ^~~~

信息

递交者
类型
递交
题目
P1026 输出和
语言
C++
递交时间
2026-12-03 10:32:30
评测时间
2026-12-03 10:32:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes