| Problem | sumint |
|---|---|
| User | karlfish26 |
| Submission Time | 2026-10-30 07:38:26 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
sumint.cpp: In function ‘int main()’:
sumint.cpp:6:6: error: ‘i’ was not declared in this scope
6 | for(i=0;i<d;i++){
| ^
sumint.cpp:9:33: error: ‘V’ was not declared in this scope
9 | int sum = accumulate(v.begin(),V.end(),0);
| ^
sumint.cpp:10:6: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
10 | cout >> sum >> '\n';
| ~~~~ ^~ ~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
sumint.cpp:10:6: note: candidate: ‘operator>>(int, int)’ <built-in>
10 | cout >> sum >> '\n';
| ~~~~~^~~~~~
sumint.cpp:10:6: note: no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:45,