Problem | sumint |
---|---|
User | ShShSh |
Submission Time | 2024-04-16 08:28:40 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
sumint.cpp:3:5: error: cannot declare ‘::main’ to be a global variable
3 | int main{
| ^~~~
sumint.cpp:4:2: error: expected primary-expression before ‘int’
4 | int n;
| ^~~
sumint.cpp:4:2: error: expected ‘}’ before ‘int’
sumint.cpp:3:9: note: to match this ‘{’
3 | int main{
| ^
sumint.cpp:5:2: error: ‘cin’ does not name a type; did you mean ‘sin’?
5 | cin >> n;
| ^~~
| sin
sumint.cpp:6:2: error: ‘arr’ does not name a type
6 | arr[n];
| ^~~
sumint.cpp:7:2: error: expected unqualified-id before ‘for’
7 | for (i=0;i<n;i++){
| ^~~
sumint.cpp:7:11: error: ‘i’ does not name a type
7 | for (i=0;i<n;i++){
| ^
sumint.cpp:7:15: error: ‘i’ does not name a type
7 | for (i=0;i<n;i++){
| ^
sumint.cpp:11:29: error: ‘arr’ was not declared in this scope
11 | int sum = accu