Problem sumint
User WoshiYC
Submission Time 2026-06-22 17:09:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:8:11: error: expected unqualified-id before ‘=’ token
8 | for (int = 1; i <= d; i++){cin >> num; sum += num;}
| ^
sumint.cpp:8:11: error: expected ‘;’ before ‘=’ token
sumint.cpp:8:11: error: expected primary-expression before ‘=’ token
sumint.cpp:8:16: error: ‘i’ was not declared in this scope
8 | for (int = 1; i <= d; i++){cin >> num; sum += num;}
| ^
sumint.cpp:8:22: error: expected ‘)’ before ‘;’ token
8 | for (int = 1; i <= d; i++){cin >> num; sum += num;}
| ~ ^
| )
sumint.cpp:8:24: error: ‘i’ was not declared in this scope
8 | for (int = 1; i <= d; i++){cin >> num; sum += num;}
| ^