Compile Error
/in/foo.cc: In function 'int main()':
/in/foo.cc:7:2: error: expected initializer before 'while'
while(a>0)
^~~~~
/in/foo.cc:5:12: warning: unused variable 'a' [-Wunused-variable]
long long a;
^
/in/foo.cc: At global scope:
/in/foo.cc:9:9: error: 'sum' does not name a type
sum+=a/10;
^~~
/in/foo.cc:10:9: error: 'a' does not name a type
a/o;
^
/in/foo.cc:11:9: error: 'cout' does not name a type
cout<<sum<<endl;
^~~~
/in/foo.cc:12:9: error: expected unqualified-id before 'return'
return 0;
^~~~~~
信息
- 递交者
- 类型
- 递交
- 题目
- P1003 求正整数各个数位上数字的和
- 语言
- C++
- 递交时间
- 2023-05-20 17:14:02
- 评测时间
- 2023-05-20 17:14:02
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes