记录详情

Compile Error

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

信息

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