Problem paint
User YongXin
Submission Time 2023-06-02 16:15:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

paint.cpp: In function ‘int main()’:
paint.cpp:7:7: error: ‘i’ was not declared in this scope
7 | for (i=0;i<n;++i){
| ^
paint.cpp:11:7: error: ‘i’ was not declared in this scope
11 | for (i=0;i<n;++i) cin>>a[i];
| ^
paint.cpp:14:7: error: ‘i’ was not declared in this scope
14 | for (i=1;i<=n;++i) r+=a[i-1]*i;
| ^
paint.cpp:15:9: error: expected ‘;’ before ‘}’ token
15 | cout<<r
| ^
| ;
16 | }
| ~