Problem sumint
User 90Dream09
Submission Time 2026-01-28 15:30:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:7:8: error: ‘array’ was not declared in this scope
7 | cin>> array[x]{};
| ^~~~~
sumint.cpp:2:1: note: ‘std::array’ is defined in header ‘<array>’; did you forget to ‘#include <array>’?
1 | #include <iostream>
+++ |+#include <array>
2 | using namespace std;
sumint.cpp:10:7: error: expected ‘;’ before ‘)’ token
10 | for(x){
| ^
| ;
sumint.cpp:14:2: error: expected primary-expression at end of input
14 | }
| ^
sumint.cpp:14:3: error: expected ‘;’ at end of input
14 | }
| ~^
| ;
sumint.cpp:14:2: error: expected primary-expression at end of input
14 | }
| ^
sumint.cpp:14:3: error: expected ‘)’ at end of input
14 | }
| ~^
| )
sumint.cpp:10:5: note: to match this ‘(’
10 | for(x){
| ^
sumint.cpp:14:2: