prog.cpp: In function ‘int main()’:
prog.cpp:6:13: error: expected ‘,’ or ‘;’ before ‘int’
int i,x,n=9;
^~~
prog.cpp:8:17: error: ‘i’ was not declared in this scope
for(i=0;i<n;i++)
^
prog.cpp:8:23: error: ‘n’ was not declared in this scope
for(i=0;i<n;i++)
^
prog.cpp:11:13: error: ‘x’ was not declared in this scope
x=a[i];
^
prog.cpp:15:13: error: ‘i’ was not declared in this scope
for(i=0;i<n;i++)
^
prog.cpp:15:19: error: ‘n’ was not declared in this scope
for(i=0;i<n;i++)
^
prog.cpp:17:13: error: ‘x’ was not declared in this scope
x=a[i];
^
prog.cpp:21:13: error: ‘i’ was not declared in this scope
for(i=0;i<n;i++)
^
prog.cpp:21:19: error: ‘n’ was not declared in this scope
for(i=0;i<n;i++)
^