0_0_19086222_32537.cpp: In function 'int main()':
0_0_19086222_32537.cpp:8:9: error: expected ';' before 'int'
int a[n],res=0;
^
0_0_19086222_32537.cpp:9:35: error: 'a' was not declared in this scope
for(int i=0;i<n;i++){cin>>a[i];res+=a[i];}
^
0_0_19086222_32537.cpp:9:40: error: 'res' was not declared in this scope
for(int i=0;i<n;i++){cin>>a[i];res+=a[i];}
^
0_0_19086222_32537.cpp:10:15: error: 'res' was not declared in this scope
cout<<res<<endl;
^
|