Problem sumint
User hitarthdangra
Submission Time 2025-06-16 15:49:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:6:10: error: expected ‘;’ before ‘int’
6 | cin >> d
| ^
| ;
7 | int numbers[d];
| ~~~
sumint.cpp:10:18: error: expected ‘;’ before ‘numbers’
10 | cin >> variable
| ^
| ;
11 | numbers[d] = variable
| ~~~~~~~
sumint.cpp:14:3: error: ‘total’ was not declared in this scope
14 | total = 0;
| ^~~~~
sumint.cpp:15:19: error: ‘numbers’ was not declared in this scope
15 | total = total + numbers[d];
| ^~~~~~~
sumint.cpp:20:2: error: expected ‘}’ at end of input
20 | }
| ^
sumint.cpp:4:12: note: to match this ‘{’
4 | int main() {
| ^