Problem potatosalad
User YongXin
Submission Time 2023-06-02 22:50:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatosalad.cpp: In function ‘int main()’:
potatosalad.cpp:7:7: error: ‘i’ was not declared in this scope
7 | for (i=0;i<n;++i) cin>>a[i];
| ^
potatosalad.cpp:10:7: error: ‘i’ was not declared in this scope
10 | for (i=0,i<d;++i) r+=a[i];
| ^
potatosalad.cpp:10:18: error: expected ‘;’ before ‘)’ token
10 | for (i=0,i<d;++i) r+=a[i];
| ^
| ;