Problem sumint
User lingfei123
Submission Time 2023-11-08 14:31:40
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:7:23: error: found ‘:’ in nested-name-specifier, expected ‘::’
7 | for (int i = 0; i < n: i++){
| ^
| ::
sumint.cpp:7:22: error: ‘n’ is not a class, namespace, or enumeration
7 | for (int i = 0; i < n: i++){
| ^
sumint.cpp:13:2: error: expected primary-expression before ‘return’
13 | return 0;
| ^~~~~~
sumint.cpp:12:22: error: expected ‘)’ before ‘return’
12 | cout << sum << '\n';
| ^
| )
13 | return 0;
| ~~~~~~
sumint.cpp:7:6: note: to match this ‘(’
7 | for (int i = 0; i < n: i++){
| ^