Problem sumint
User Yvonne
Submission Time 2024-06-18 13:25:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp:2:17: error: ‘srd’ is not a namespace-name
2 | using namespace srd;
| ^~~
sumint.cpp: In function ‘int main()’:
sumint.cpp:6:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
6 | cin>>d;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
from sumint.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
sumint.cpp:11:8: error: ‘arr’ was not declared in this scope
11 | sum+=arr[i];
| ^~~
sumint.cpp:12:3: error: expected primary-expression before ‘)’ token
12 | )
| ^
sumint.cpp:14:3: error: expected primary-expression before ‘)’ token
14 | )
| ^
sumint.cpp:14:3: error: expected ‘}’ at end of input
sumint.cpp:8:25: note: to match t