Problem potatosalad
User lxmine
Submission Time 2026-05-30 20:32:26
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatosalad.cpp: In function ‘int main()’:
potatosalad.cpp:9:36: error: ‘sum’ was not declared in this scope
9 | for(int i=0; i<std::min(d,n); i++)sum+=xyz[i];
| ^~~
potatosalad.cpp:10:13: error: ‘sum’ was not declared in this scope
10 | std::cout<<sum<<endl;
| ^~~
potatosalad.cpp:10:18: error: ‘endl’ was not declared in this scope; did you mean ‘std::endl’?
10 | std::cout<<sum<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/9/istream:39,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from potatosalad.cpp:1:
/usr/include/c++/9/ostream:599:5: note: ‘std::endl’ declared here