Problem modsum
User samantha32072
Submission Time 2023-02-16 20:43:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

modsum.cpp: In function ‘int main()’:
modsum.cpp:4:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
4 | cin >> n;
| ^~~
| std::cin
In file included from modsum.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
modsum.cpp:7:19: error: expected primary-expression before ‘)’ token
7 | for(i=1,i<=n,i++;){
| ^
modsum.cpp:7:19: error: expected ‘;’ before ‘)’ token
7 | for(i=1,i<=n,i++;){
| ^
| ;
modsum.cpp:8:10: error: ‘v’ was not declared in this scope
8 | cin >> v >> w;
| ^
modsum.cpp:8:15: error: ‘w’ was not declared in this scope
8 | cin >> v >> w;
| ^
modsum.cpp:9:3: error: ‘total’ was not declared in this s